Events are useful mechanisms to transfer data and control from asynchronous events back to the Reactive Blocks runtime. They are typically used for blocking or CPU intensive operations that need to run in separate threads so that they comply with the Run to completion rule described here.
Note that usage is not limited from threads, but may also be used within a block.
Note the edge from getPrime to the event reception, this is what tells Reactive Blocks that an event name PRIME may be expected.
The PRIME event is generated from within a thread in the GetPrime class using sendToBlock. Note that the getPrime method returns immediately giving control back to the Reactive Blocks runtime after having started the thread.