setting up wrappers

This commit is contained in:
Jaremy Creechley 2024-02-13 22:37:49 -07:00
parent 14d65a5060
commit fd323de9b7
No known key found for this signature in database
GPG Key ID: 4E66FB67B21D3300

View File

@ -28,6 +28,8 @@ macro asyncTask*(p: untyped): untyped =
echo "\nASYNC_TASK: "
echo "name: ", name
# echo "ASYNC_TASK: call: \n", tcall.treeRepr
if not hasReturnType(params):
error("tasklet definition must have return type", p)
let tp = mkProc(procId.procIdentAppend("Tasklet"),
params, body)
@ -62,9 +64,9 @@ type
HashOptions* = object
striped*: bool
proc doHashes*(data: openArray[byte],
opts: HashOptions) {.asyncTask.} =
echo "hashing"
# proc doHashes*(data: openArray[byte],
# opts: HashOptions) {.asyncTask.} =
# echo "hashing"
proc doHashes2*(data: openArray[byte],
opts: HashOptions): float {.asyncTask.} =