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):
|
def a(turn, two):
|
||||||
print('A got assertion:', two)
|
print('A got assertion:', two)
|
||||||
turn.send(b.embeddedValue, Three())
|
turn.send(b.embeddedValue, Three())
|
||||||
return lambda turn: print('Assertion', two, 'from B went')
|
def on_two_retracted(turn):
|
||||||
turn.publish(b.embeddedValue, One(Embedded(turn.ref(a))))
|
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')
|
return lambda turn: print('B\'s Boot record went')
|
||||||
else:
|
else:
|
||||||
# We are "B".
|
# We are "B".
|
||||||
|
|
|
@ -65,6 +65,8 @@ class During(Handler):
|
||||||
def facet(turn):
|
def facet(turn):
|
||||||
if self.inert_ok:
|
if self.inert_ok:
|
||||||
turn.prevent_inert_check()
|
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 lambda turn: turn.stop(facet)
|
||||||
return facet_handler
|
return facet_handler
|
||||||
|
|
Loading…
Reference in New Issue