bugfix: codegen for promises

This commit is contained in:
Araq 2014-06-02 09:13:16 +02:00
commit b78173788d
3 changed files with 13 additions and 5 deletions

View file

@ -151,7 +151,7 @@ proc await*[T](prom: Promise[T]) =
if prom.usesCondVar: await(prom.cv)
proc awaitAndThen*[T](prom: Promise[T]; action: proc (x: T) {.closure.}) =
## blocks until the value is available and then passes this value
## blocks until the ``prom`` is available and then passes its value
## to ``action``. Note that due to Nimrod's parameter passing semantics this
## means that ``T`` doesn't need to be copied and so ``awaitAndThen`` can
## sometimes be more efficient than ``^``.