Closed romansl closed 8 years ago
I will think about this and check in a comment explaining it.
This is to prevent the "switched to stream" from firing an event which clobbers the event fired by the "switched from stream". In the Denotational Semantics SwitchS example, cell c
switches from stream s1
to stream s2
during the transaction at t = [1]
, but this should not take effect until the end of the transaction. Therefore, the code needs to start listening for events on s2
, but ignoring any that are sent during that same transaction. That way, the event fired by s1
will be output rather than the simultaneous event fired by s2
.
In the
switchS
you passsuppressEarlierFirings=true
tolisten
(Cell.java:426). Why?