elizarov
12/28/2016, 11:18 PMContinuationWait
, though. You check if (completed)
and if not then you assign continuation and wait. However, after you've checked that it is not complete and before you've set attachedContinuation = c
, your original continuation could have resumed and saw that attachedContinuation
is still null.(so you'll loose the signal and will never resume)