Batch Procedures together. The elements are evaluated in order.
Construct a Procedure instance that modifies shared memory state.
Construct a Procedure instance that pushes a local Cmd.
Construct a Procedure instance that awaits the local events for the thread.
If it returns Nothing, it awaits again.
Otherwise, it evaluates the given Procedure.
Construct a Procedure instance that awaits global events.
If it returns Nothing, it awaits again.
Otherwise, it evaluates the given Procedure.
Construct a Procedure instance that evaluates the given Procedure in a forked thread.
The forked thread runs independently of the original thread.
i.e., The subsequent Procedures in the original thread are evaluated immediately.
Construct a Procedure instance that wait for all given Procedures to be completed.
Given Procedures are evaluated in the independent thread, but the subsequent Procedures in the original thread are not evaluated immediately.
Quit the thread immediately.
Subsequent Procedures are not evaluated and are discarded.
These items are needed when you try to build a hierarchy of shared memory and events in an SPA. Note that the pattern often unnecessarily increases complexity, so you should first consider using monolithic shared memory and events.
For a sample, see sample/src/SPA.elm.
It is recommended to use Thread.Browser for normal use.
Procedures to be processed in a thread.