Boost logo

Boost :

Subject: Re: [boost] [next gen future-promise] Whattocallthemonadicreturntype?
From: Peter Dimov (lists_at_[hidden])
Date: 2015-05-26 09:31:21


Giovanni Piero Deretta wrote:

> You need to protect concurrent calls to then...

Hm, good point, I hadn't thought of that.

Note however that if remove promise::get_future and create a promise/future
pair in one go, I can then in principle check that the future is unique and
omit the mutex lock.

> You might as well use it to protect the refcount.

Eh, no. Refcounts have been protecting themselves for decades. :-)


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