You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently many events are emitted synchronously in response to local function calls, for example submitOp emits an op event synchronously. This leads to some unexpected behaviours, for example:
The first handler is called with source '1' and submits op2.
An 'op' event is emitted with source '2'.
The first handler is called with source '2' and exits.
The second handler is called with source '2' and prints it.
The second handler is called with source '1' and prints it.
In order to deal with this issue perhaps we could use an approach similar to MutationObserver, where synchronous operations are recorded in an Array and then a single event is emitted asynchronously with the list as a parameter?
Currently many events are emitted synchronously in response to local function calls, for example
submitOp
emits anop
event synchronously. This leads to some unexpected behaviours, for example:prints:
instead of:
which reflects the actual order of operations.
Here's what happens in the example above:
op1
is submitted.'op'
event is emitted with source'1'
.'1'
and submitsop2
.'op'
event is emitted with source'2'
.'2'
and exits.'2'
and prints it.'1'
and prints it.In order to deal with this issue perhaps we could use an approach similar to MutationObserver, where synchronous operations are recorded in an Array and then a single event is emitted asynchronously with the list as a parameter?
Related issues:
The text was updated successfully, but these errors were encountered: