[cpp-threads] Asynchronous Function Proposal

Howard Hinnant hinnant at twcny.rr.com
Mon Jun 1 20:13:28 BST 2009


On Jun 1, 2009, at 3:07 PM, Beman Dawes wrote:

> On Mon, Jun 1, 2009 at 9:36 AM, Peter Dimov <pdimov at mmltd.net> wrote:
>> Beman Dawes:
>>>
>>> As Herb pointed out, this makes it look like we have serious  
>>> problems with
>>> the current future interface and/or the current thread interface.  
>>> I very
>>> much want to hear what Howard, Anthony, and others with a deep  
>>> understanding
>>> of standard library threads/futures/promises have to say about  
>>> these issues.
>>
>> I've pointed out many times that the thread class needs "proper" join
>> semantics, including try_join and timed_join.
>
> Could someone please refresh my memory as to why try_join and
> timed_join were not included? Was it a lack of motivating use cases?

For my money it is because of lack of those functions in the posix  
API.  I.e. I'd like to layer std::thread as thinly as possible over  
what my OS offers, which is pthreads.  Adding try/time_join into  
higher level layers (such as future) doesn't bother me at all because  
one is already into thicker layers (auxiliary heap storage) by then.

-Howard




More information about the cpp-threads mailing list