async: You can use -d:nimAsyncDebug to see what the .async macro expands to

This commit is contained in:
Araq
2016-06-30 18:40:46 +02:00
parent d8ee2c2409
commit c30e9b9b75

View File

@@ -1931,6 +1931,8 @@ macro async*(prc: stmt): stmt {.immediate.} =
result.add asyncSingleProc(oneProc)
else:
result = asyncSingleProc(prc)
when defined(nimAsyncDebug):
echo repr result
proc recvLine*(socket: AsyncFD): Future[string] {.async.} =
## Reads a line of data from ``socket``. Returned future will complete once