-
-
Save dom96/4046cf5ee677cbae1c069bc734b8cca6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import asyncdispatch | |
proc main() {.async.} = | |
var fut = newFuture[void]("blah") | |
fut.complete() | |
doAssert(fut.finished) | |
await(fut) | |
FutureVar[void](fut).clean() | |
fut.cb = proc () = discard | |
doAssert(not finished(fut)) | |
fut.complete() | |
doAssert(finished(fut)) | |
waitFor main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment