docs: clarify asyncCheck vs waitFor
This commit is contained in:
parent
f8cef575b3
commit
4362ba7293
2 changed files with 5 additions and 2 deletions
|
|
@ -339,7 +339,8 @@ proc asyncCheck*[T](future: Future[T]) =
|
|||
## Sets a callback on ``future`` which raises an exception if the future
|
||||
## finished with an error.
|
||||
##
|
||||
## This should be used instead of ``discard`` to discard void futures.
|
||||
## This should be used instead of ``discard`` to discard void futures,
|
||||
## or use ``waitFor`` if you need to wait for the future's completion.
|
||||
assert(not future.isNil, "Future is nil")
|
||||
future.callback =
|
||||
proc () =
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue