terminate: fix off-by-inifinity bug
This commit is contained in:
parent
2f4552e7fe
commit
fc94fa39d8
|
@ -411,11 +411,11 @@ proc terminate(actor; turn; reason: ref Exception) =
|
|||
actor.exitReason = reason
|
||||
for hook in actor.exitHooks: hook(turn)
|
||||
proc finish(turn: var Turn) =
|
||||
actor.root.terminate(turn, not reason.isNil)
|
||||
if reason.isNil:
|
||||
actor.root.terminate(turn, reason.isNil)
|
||||
if actor.exitReason.isNil:
|
||||
actor.future.complete()
|
||||
else:
|
||||
actor.future.fail reason
|
||||
actor.future.fail actor.exitReason
|
||||
callSoon do ():
|
||||
run(actor.root, finish, true)
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# Package
|
||||
|
||||
version = "20230610"
|
||||
version = "20230611"
|
||||
author = "Emery Hemingway"
|
||||
description = "Syndicated actors for conversational concurrency"
|
||||
license = "Unlicense"
|
||||
|
|
Loading…
Reference in New Issue