Replace mutable handles in-place
This commit is contained in:
parent
9648884997
commit
9048506981
|
@ -291,6 +291,12 @@ proc replace*[T](turn: var Turn; `ref`: Ref; h: Handle; v: T): Handle =
|
|||
result = publish(turn, `ref`, v)
|
||||
retract(turn, h)
|
||||
|
||||
proc replace*[T](turn: var Turn; `ref`: Ref; h: var Handle; v: T): Handle {.discardable.} =
|
||||
var old = h
|
||||
h = publish(turn, `ref`, v)
|
||||
retract(turn, old)
|
||||
h
|
||||
|
||||
proc stop*(turn: var Turn) {.gcsafe.}
|
||||
|
||||
proc run*(facet; action: TurnAction; zombieTurn = false) {.gcsafe.}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# Package
|
||||
|
||||
version = "1.3.0"
|
||||
version = "1.3.1"
|
||||
author = "Emery Hemingway"
|
||||
description = "Syndicated actors for conversational concurrency"
|
||||
license = "Unlicense"
|
||||
|
|
Loading…
Reference in New Issue