Boost logo

Boost :

Subject: Re: [boost] [future N2561] Implementation comments
From: Anthony Williams (anthony.ajw_at_[hidden])
Date: 2008-12-03 10:05:11

"vicente.botet" <vicente.botet_at_[hidden]> writes:

> From: "Anthony Williams" <anthony.ajw_at_[hidden]>
>> "vicente.botet" <vicente.botet_at_[hidden]> writes:
>>> Ok, I see. Do we need to set_value from different threads? Should
>>> the promise::set_value() be thread safe or not? What says the C++0x
>>> standard?
>> The C++0x draft standard is silent on the matter. I think it probably
> So the idea is that a promise should be used only by a thread. Right?

Some of the proposed uses would require that set_value is thread-safe.
>>>> Protection of lazy_init would require a different mechanism, such as
>>>> the use of boost::call_once.
>>> Why not?
> Sorry, I would like to say why not!

I don't understand. Please can you ask your question using other


Anthony Williams
Author of C++ Concurrency in Action |
Custom Software Development |
Just Software Solutions Ltd, Registered in England, Company Number 5478976.
Registered Office: 15 Carrallack Mews, St Just, Cornwall, TR19 7UL, UK

Boost list run by bdawes at, gregod at, cpdaniel at, john at