|
Boost : |
Subject: Re: [boost] Boost sprint: #3407 boost::call_once not re-entrant (at least in win32)
From: Anthony Williams (anthony.ajw_at_[hidden])
Date: 2009-11-25 04:42:41
Gottlob Frege <gottlobfrege_at_[hidden]> writes:
> On Wed, Nov 25, 2009 at 12:59 AM, Gottlob Frege <gottlobfrege_at_[hidden]> wrote:
>>> I've checked in a new version on trunk
>>>
>>> https://svn.boost.org/svn/boost/trunk/boost/thread/win32/once.hpp
>>>
>> Probably, except you never actually wait on the event! :-)
>> (or maybe I missed it).
>>
>> I'm assuming you mean to wait on it  after the 'waiting' thread
>> creates it if it doesn't exist:
>>
>> Â Â Â Â Â Â if(!counted)
>> Â Â Â Â Â Â {
>> Â Â Â Â Â Â Â Â ***** Wait(event_handle); ****** ?
>> Â Â Â Â Â Â }
>>
>
> Or not quite there, because of the 'continue', but somewhere around there. (?)
Just outside the closing brace of the if(!counted) block. I've checked
in the change.
Anthony
-- Author of C++ Concurrency in Action http://www.stdthread.co.uk/book/ just::thread C++0x thread library http://www.stdthread.co.uk Just Software Solutions Ltd http://www.justsoftwaresolutions.co.uk 15 Carrallack Mews, St Just, Cornwall, TR19 7UL, UK. Company No. 5478976
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk