Compare commits
2 Commits
4821f32e8b
...
0a85fc232d
Author | SHA1 | Date |
---|---|---|
Tony Garnock-Jones | 0a85fc232d | |
Tony Garnock-Jones | 88bd5e1cf4 |
|
@ -64,8 +64,11 @@ def main(turn):
|
|||
def a(turn, two):
|
||||
print('A got assertion:', two)
|
||||
turn.send(b.embeddedValue, Three())
|
||||
return lambda turn: print('Assertion', two, 'from B went')
|
||||
turn.publish(b.embeddedValue, One(Embedded(turn.ref(a))))
|
||||
def on_two_retracted(turn):
|
||||
print('Assertion', two, 'from B went')
|
||||
turn.retract(one_handle)
|
||||
return on_two_retracted
|
||||
one_handle = turn.publish(b.embeddedValue, One(Embedded(turn.ref(a))))
|
||||
return lambda turn: print('B\'s Boot record went')
|
||||
else:
|
||||
# We are "B".
|
||||
|
|
|
@ -65,6 +65,8 @@ class During(Handler):
|
|||
def facet(turn):
|
||||
if self.inert_ok:
|
||||
turn.prevent_inert_check()
|
||||
handler(turn, *args)
|
||||
maybe_stop_action = handler(turn, *args)
|
||||
if maybe_stop_action is not None:
|
||||
turn.on_stop(maybe_stop_action)
|
||||
return lambda turn: turn.stop(facet)
|
||||
return facet_handler
|
||||
|
|
Loading…
Reference in New Issue