Implements {.multisync.} pragma for async and sync proc combos.
This commit is contained in:
parent
2864c346e3
commit
1740619c0c
2 changed files with 118 additions and 0 deletions
8
tests/async/tmultisync.nim
Normal file
8
tests/async/tmultisync.nim
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
import asyncdispatch, net, asyncnet
|
||||
|
||||
proc recvTwice(socket: Socket | AsyncSocket,
|
||||
size: int): Future[string] {.multisync.} =
|
||||
var x = await socket.recv(size)
|
||||
var y = await socket.recv(size+1)
|
||||
return x & "aboo" & y
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue