Boost logo

Boost :

From: Anthony Williams (anthony_w.geo_at_[hidden])
Date: 2008-05-06 02:42:06


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

> why we don't need to protect get_future() function of multiple thread
> access?

By design you can only call this function once, so if multiple threads called
it concurrently and that was safe, only one would get the future, and the
other would get an exception. The user should therefore use appropriate
synchronization to ensure correct results anyway, so making this call
thread-safe would not be of benefit.

Anthony

-- 
Anthony Williams            | Just Software Solutions Ltd
Custom Software Development | http://www.justsoftwaresolutions.co.uk
Registered in England, Company Number 5478976.
Registered Office: 15 Carrallack Mews, St Just, Cornwall, TR19 7UL

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk