Reactor: a synchronous reactive language

submited by
Style Pass
2024-12-22 14:30:03

The run of one program is broken up into reactions (also called instants ), each of which can be though of as being instantaneous —that is, absent side effects, no concurrent thread of execution runs before or after any other thread. They all occur at the same time, and so seem to take zero logical time. Thus, concurrent computations are deterministic.

Every expression in the program either takes zero time (e.g. completes in the current reaction) or pauses , which "consumes" time, stopping the computation there until the next reaction .

The code within a reactor? can be a mix of both reactive code (like par& ) and non-reactive code (e.g. normal racket expressions). This non-reactive will never consume time and should always terminate.

In general racket level side effects (mutation, non-termination, etc) may break the guarantee of determininistic concurrencuy.

Leave a Comment