Add stop(Facet)
This commit is contained in:
parent
399fd4a30c
commit
87e730bc5b
|
@ -633,6 +633,9 @@ proc stop*(turn: var Turn, facet: Facet) =
|
|||
proc stop*(turn: var Turn) =
|
||||
stop(turn, turn.facet)
|
||||
|
||||
proc stop*(facet: Facet) =
|
||||
run(facet, stop)
|
||||
|
||||
proc onStop*(facet: Facet; act: TurnAction) =
|
||||
## Add a `proc (turn: var Turn)` action to `facet` to be called as it stops.
|
||||
add(facet.shutdownActions, act)
|
||||
|
|
Loading…
Reference in New Issue