Merge pull request #6122 from ephja/asyncfutures-missed-rewrite
make asyncfutures.complete compile
This commit is contained in:
commit
ec9de2e3cd
1 changed files with 1 additions and 2 deletions
|
|
@ -165,8 +165,7 @@ proc complete*[T](future: FutureVar[T], val: T) =
|
||||||
assert(fut.error.isNil())
|
assert(fut.error.isNil())
|
||||||
fut.finished = true
|
fut.finished = true
|
||||||
fut.value = val
|
fut.value = val
|
||||||
if not fut.cb.isNil():
|
fut.callbacks.call()
|
||||||
fut.cb()
|
|
||||||
|
|
||||||
proc fail*[T](future: Future[T], error: ref Exception) =
|
proc fail*[T](future: Future[T], error: ref Exception) =
|
||||||
## Completes ``future`` with ``error``.
|
## Completes ``future`` with ``error``.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue