Compare commits

...

2 Commits

2 changed files with 8 additions and 3 deletions

View File

@ -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".

View File

@ -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