testing to see if this fixes failure in ci

This commit is contained in:
Eric 2024-10-29 16:20:50 +11:00
parent 8806166a26
commit a180815ab3
No known key found for this signature in database
1 changed files with 7 additions and 7 deletions

View File

@ -90,13 +90,13 @@ proc start*(machine: Machine, initialState: State) =
machine.scheduled = newAsyncQueue[Event]()
machine.started = true
machine.scheduler()
.track(machine)
.cancelled(proc() = trace("machine.scheduler cancelled, swallowing"))
.catch((err: ref CatchableError) =>
error("Error in scheduler", error = err.msg)
)
machine.schedule(Event.transition(machine.state, initialState))
try:
discard machine.scheduler().track(machine)
machine.schedule(Event.transition(machine.state, initialState))
except CancelledError as e:
discard
except CatchableError as e:
error("Error in scheduler", error = e.msg)
proc stop*(machine: Machine) {.async.} =
if not machine.started: