Boost logo

Boost Users :

From: Hughes, James (jhughes_at_[hidden])
Date: 2008-03-17 11:09:53


> -----Original Message-----
> From: boost-users-bounces_at_[hidden]
> [mailto:boost-users-bounces_at_[hidden]] On Behalf Of Zeljko Vrba
> Sent: 17 March 2008 15:04
> To: boost-users_at_[hidden]
> Subject: Re: [Boost-users] Threads Don't Take Turns Under
> Linux (UbuntuGutsy Gibbon)
>
> On Mon, Mar 17, 2008 at 09:42:46AM -0400, Hal Vaughan wrote:
> >
> > Am I doing something wrong or is there a setting I need to change?
> >
> That's normal behavior; threads are scheduled by the OS. In
> your case, the thread fills the buffer faster then its
> timeslice expires, so you see buffer being filled/emptied in
> "batches". If you want them to be interleaved, lower the
> buffer size or try running on an SMP machine.
>

Or put a usleep(0) in the thread to force the timeslice to expire? IIRC.

James

This message (including any attachments) contains confidential
and/or proprietary information intended only for the addressee.
Any unauthorized disclosure, copying, distribution or reliance on
the contents of this information is strictly prohibited and may
constitute a violation of law. If you are not the intended
recipient, please notify the sender immediately by responding to
this e-mail, and delete the message from your system. If you
have any questions about this e-mail please notify the sender
immediately.


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