[reactive] Ordering of events in Reactive / Phooey

Thomas Davie tom.davie at gmail.com
Mon Mar 23 09:40:21 EDT 2009


On 23 Mar 2009, at 13:55, Mads Lindstrøm wrote:

> Hi
>
> If an end-user of a Reactive-based GUI (e.g. Phooey) triggers two
> events, am I sure that event one will be processed before event  
> two ? (I
> am assuming that event one occurs before event two)
>
> The reason behind this question is:
>
> 1) that Reactive uses threads when two event sources are merged - the
> unambiguous choice function (Unamb.unamb).

Yes, if you check the source here, you'll see that as soon as one  
event is triggered, it checks whether the other event has occured,  
then returns the one with the earlier time stamp if both have occured.

> When looking at the Phooey and the Reactive code, I could not find the
> mkEvent function in newer Reactive releases. I therefore also looked  
> at
> version 0.5, which did not seem to have these bounded time values.  
> This
> may be the cause of some of my confusion.


Indeed, early versions did not use bounds, the particular bit of code  
you need to look at in newer versions is TMVar IIRC, but don't quote  
me on that.

Bob


More information about the Reactive mailing list