My project needs the ability to wait on a future with a timeout, mostly to make sure unit tests don't hang forever if unexpected things happen. I thought this might be useful for others as well.
In waitImpl, I used the same scheme as std::condition_variable::wait_until for dealing with clocks. This way it should be easy to add djinni::Future::waitUntil if needed.
My project needs the ability to wait on a future with a timeout, mostly to make sure unit tests don't hang forever if unexpected things happen. I thought this might be useful for others as well.
In
waitImpl
, I used the same scheme as std::condition_variable::wait_until for dealing with clocks. This way it should be easy to adddjinni::Future::waitUntil
if needed.