setting up wrappers

This commit is contained in:
Jaremy Creechley 2024-02-13 22:44:13 -07:00
parent 14392e838f
commit e390d915fa
No known key found for this signature in database
GPG Key ID: 4E66FB67B21D3300

View File

@ -42,8 +42,8 @@ macro asyncTask*(p: untyped): untyped =
# asyncBody.add nnkLetSection.newTree(
# nnkIdentDefs.newTree(ident"res", newEmptyNode(), tcall))
asyncBody = quote do:
let res {.inject.} = `tcall`
discard jobResult.queue.send((jobResult.id, res,))
let val {.inject.} = `tcall`
discard jobResult.queue.send((jobResult.id, val,))
var asyncParams = params.copyNimTree()
let retType = if not hasReturnType(params): ident"void"