Boost logo

Boost :

Subject: Re: [boost] Boost sprint: #3407 boost::call_once not re-entrant (atleast in win32)
From: Anthony Williams (anthony.ajw_at_[hidden])
Date: 2009-11-23 08:57:57


"Peter Dimov" <pdimov_at_[hidden]> writes:

> Anthony Williams wrote:
>> Gottlob Frege <gottlobfrege_at_[hidden]> writes:
>>
>>> - if the exception handling and/or recursion handling are worthwhile
>>> options
>>
>> I don't believe so.
>
> Exceptions need to be handled properly. Recursion does not.

The current implementation handles exceptions "properly" in the sense
that if the once function exits with an exception then it is not marked
as called and another thread (possibly one of those waiting) will call
it.

The suggestion is to optionally have the function marked as called even
if an exception is thrown. I don't think this is worthwhile.

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