Great idea! You have "check and act" problem in `C...
# coroutines
e
Great idea! You have "check and act" problem in
ContinuationWait
, 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)