Clean up unwanted state in bidi-gc A

This commit is contained in:
Tony Garnock-Jones 2021-09-08 13:08:58 +02:00
parent 88bd5e1cf4
commit 0a85fc232d
1 changed files with 5 additions and 2 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".