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
|
actor.exitReason = reason
|
||||||
for hook in actor.exitHooks: hook(turn)
|
for hook in actor.exitHooks: hook(turn)
|
||||||
proc finish(turn: var Turn) =
|
proc finish(turn: var Turn) =
|
||||||
actor.root.terminate(turn, not reason.isNil)
|
actor.root.terminate(turn, reason.isNil)
|
||||||
if reason.isNil:
|
if actor.exitReason.isNil:
|
||||||
actor.future.complete()
|
actor.future.complete()
|
||||||
else:
|
else:
|
||||||
actor.future.fail reason
|
actor.future.fail actor.exitReason
|
||||||
callSoon do ():
|
callSoon do ():
|
||||||
run(actor.root, finish, true)
|
run(actor.root, finish, true)
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
# Package
|
# Package
|
||||||
|
|
||||||
version = "20230610"
|
version = "20230611"
|
||||||
author = "Emery Hemingway"
|
author = "Emery Hemingway"
|
||||||
description = "Syndicated actors for conversational concurrency"
|
description = "Syndicated actors for conversational concurrency"
|
||||||
license = "Unlicense"
|
license = "Unlicense"
|
||||||
|
|
Loading…
Reference in New Issue