Document await

This commit is contained in:
Kodi Arfer 2019-07-18 10:43:01 -04:00
parent 1b1a6d7684
commit 0fcf570a3f

View File

@ -224,6 +224,23 @@ Examples of usage:
.. note:: ``assoc`` modifies the datastructure in place and returns ``None``.
await
-----
``await`` creates an :ref:`await expression <py:await>`. It takes exactly one
argument: the object to wait for.
::
=> (import asyncio)
=> (defn/a main []
... (print "hello")
... (await (asyncio.sleep 1))
... (print "world"))
=> (asyncio.run (main))
hello
world
break
-----