
"vicente.botet" <vicente.botet@wanadoo.fr> writes:
From: "Anthony Williams" <anthony.ajw@gmail.com>
"vicente.botet" <vicente.botet@wanadoo.fr> 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 words. Anthony -- Anthony Williams Author of C++ Concurrency in Action | http://www.manning.com/williams Custom Software Development | http://www.justsoftwaresolutions.co.uk Just Software Solutions Ltd, Registered in England, Company Number 5478976. Registered Office: 15 Carrallack Mews, St Just, Cornwall, TR19 7UL, UK