What is the event processing order for the spill function in Reactive-Banana?

I tested this, and it seems that the order of event processing is the same as the list order in the original event. I don't think I can rely on this, as the documentation only says:

Release simultaneous events. To severity, we have a spill. collect = id

How to create a function similar to a spill with a specification like:

Output sequential events with the guarantee that no other events will fire between the first and last

Or should I try a different approach? I am trying to implement macro functions in Reactive-Banana

+6
source share
1 answer

(I am the author of jet banana.)

It seems that the order of event processing is the same as the order of the list in the original event.

That's right, you can rely on it. In fact, this more or less follows from the spill . collect = id equation spill . collect = id spill . collect = id . In the end, in order to get an identical display, spill must preserve the order of events, since collect put them in a list.

In addition, you can check the source code of the modules Reactive.Banana.Model ( Reactive.Banana.Internal.Model in version 0.5) and Reactive.Banana.Combinators . Taken together, they provide an authoritarian model of implementation. You can directly check how the spill behaves. (Although this can be a bit confusing as the model is built in two parts.)

However, I will add a few words to the documentation.

+3
source

Source: https://habr.com/ru/post/912806/


All Articles