I was initially checking OwnCancelSchedule flag being set in this primitives and after test i was agreed that its needed, because otherwise its hard to keep order of execution:
wait() and withTimeout() should not be cancelled() first, before future passed as argument will not be completed. So even retFuture become cancelled it should wait until situation with future will not be resolved.
I was initially checking
OwnCancelSchedule
flag being set in this primitives and after test i was agreed that its needed, because otherwise its hard to keep order of execution:wait()
andwithTimeout()
should not be cancelled() first, beforefuture
passed as argument will not be completed. So evenretFuture
become cancelled it should wait until situation withfuture
will not be resolved.