executors / futures

A proposal for a futures programming model for ISO C++
22 stars 7 forks source link

Converting continuable futures into shared futures #126

Open griwes opened 6 years ago

griwes commented 6 years ago

This issue was raised by @hkaiser in the SG1 discussion.

I believe that one way to do this is have separate promise contracts that guarantee getting shared futures instead of unique futures, and then providing a free function that takes a continuable future, uses the shared contracts on its executor, and then attaches a continuation that fulfills the shared promise and then returns the shared future. I'll try to draft an example later.

cc @LeeHowes @dhollman