Boost logo

Boost Users :

Subject: Re: [Boost-users] Threads example question
From: David Doria (daviddoria_at_[hidden])
Date: 2009-06-24 13:20:54


On Wed, Jun 24, 2009 at 1:08 PM, Anders Wallin
<anders.e.e.wallin_at_[hidden]>wrote:

> I'm trying to learn how to use Boost.Threads with this example:
> http://pastebin.ca/1472832
>
> On Ubuntu 8.04 with Boost 1.34 I'm compiling with a makefile like this:
> t1: t1.o
> g++ t1.o /usr/lib/libboost_thread-mt.so -o t1
> t1.o: t1.cpp
> g++ -I /usr/include/boost/ -c t1.cpp
>
>
> However I get very similar execution times for the single-threaded
> version and the one which creates two threads.
>
> What am I doing wrong?
>
> thanks,
>
> Anders W
> _____

Do you have a multi-core machine? I'd suspect with a single core multiple
threads won't help things go faster.

Thanks,

David



Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net