Closed michielbdejong closed 5 months ago
Ah but this doesn't work of course if the promises include waiting for a raise-hand
message to be delivered!
I moved from outbox to promises because I want to do an isVirginFor
check just in time before actually sending a probe.
But the current setup with promises has the problem that alice.meet(bob);
doesn't complete within one flush of BatchedMessageForwarder
.
So maybe the third solution is to queue the offerProbe tasks. Maybe I can achieve that by removing await
for that call?
The Polite protocol is only needed for Probes! So I think I will put the semaphore mechanism directly into Butterfly.
Meet messages and Loop messages wouldn't normally cross in mid-air.
It feels a bit sketchy to await promises across nodes in the simulator. But maybe it's OK in the BatchedMessageForwarder, so all effects of one message get played out until all the triggered messages are queued for the next batch?