From fbad0e13a59d45a5da5168d2f30f266b6cca8067 Mon Sep 17 00:00:00 2001 From: Jaremy Creechley Date: Tue, 13 Feb 2024 21:49:59 -0700 Subject: [PATCH] refactoring --- src/apatheia/jobs.nim | 2 +- tests/tjobs.nim | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/src/apatheia/jobs.nim b/src/apatheia/jobs.nim index 286ee60..201a5f3 100644 --- a/src/apatheia/jobs.nim +++ b/src/apatheia/jobs.nim @@ -72,6 +72,6 @@ template submit*[T](jobs: JobQueue[T], exp: untyped): Future[T] = template jobWrapper*(task: untyped) = template `task Wrapper`*(jobResult: JobResult[float], args: varargs[untyped]) = - let res = unpackVarargs(`task`(args)) + let res = unpackVarargs(`task`, args) discard jobResult.queue.send((jobResult.id, res,)) diff --git a/tests/tjobs.nim b/tests/tjobs.nim index 067581c..8888d8e 100644 --- a/tests/tjobs.nim +++ b/tests/tjobs.nim @@ -20,8 +20,6 @@ proc addNums(jobResult: JobResult[float], a, b: float) = let res = addNumsRaw(a, b) discard jobResult.queue.send((jobResult.id, res,)) -jobWrapper(addNumsRaw) - suite "async tests": # var tp = Taskpool.new(num_threads = 2) # Default to the number of hardware threads.