Boost logo

Threads-Devel :

Subject: Re: [Threads-devel] may be a bug in boost.thread on freebsd 8.0
From: John Rocha (jrr_at_[hidden])
Date: 2010-07-28 11:18:15


 From my reading, and a new google search, pthread condvars can be used
between processes. However, the condvar ans the global they are
monitoring have to be in memory that is shared between the processes,
and the condvar has to be initialized in a way that indicates its shared
between processes.

References:
http://www.cs.cf.ac.uk/Dave/C/node31.html#SECTION003120000000000000000
http://stackoverflow.com/questions/2782883/condition-variable-in-shared-memory-is-this-code-posix-conformant

-=John

Anthony Williams wrote:
> On 28/07/10 15:09, å×ÇÅÎÉÊ ûÕÂÉÎ wrote:
>> I have tried using raw pthread and it works fine. Here is a sample code:
>
> [snip]
>
>> But there is no usage of condition variable.
>
> Do pthread condition variables work with fork()?
>
>> I see no reason using it in such simple task like thread joining.
>
> They are used by boost.thread to enable timed_join.
>
>> Should I dive into source code of boost.thread(pthread/thread.cpp) to
>> solve this problem?
>
> If you like.
>
> Anthony

-- 
Thought for the day: "2 much txting mks u 1 bad splr!!!!"

Threads-Devel list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk