mtasks.nim 233 B

123456789101112131415
  1. # tasks.nim
  2. type
  3. Task* = ptr object
  4. parent*: Task
  5. prev*: Task
  6. next*: Task
  7. fn*: proc (param: pointer) {.nimcall.}
  8. # StealableTask API
  9. proc allocate*(task: var Task) =
  10. discard
  11. proc delete*(task: Task) =
  12. discard