async: You can use -d:nimAsyncDebug to see what the .async macro expands to
This commit is contained in:
parent
d8ee2c2409
commit
c30e9b9b75
1 changed files with 2 additions and 0 deletions
|
|
@ -1931,6 +1931,8 @@ macro async*(prc: stmt): stmt {.immediate.} =
|
||||||
result.add asyncSingleProc(oneProc)
|
result.add asyncSingleProc(oneProc)
|
||||||
else:
|
else:
|
||||||
result = asyncSingleProc(prc)
|
result = asyncSingleProc(prc)
|
||||||
|
when defined(nimAsyncDebug):
|
||||||
|
echo repr result
|
||||||
|
|
||||||
proc recvLine*(socket: AsyncFD): Future[string] {.async.} =
|
proc recvLine*(socket: AsyncFD): Future[string] {.async.} =
|
||||||
## Reads a line of data from ``socket``. Returned future will complete once
|
## Reads a line of data from ``socket``. Returned future will complete once
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue