"sequenceAction"
"org.simantics.simulation.sequences.action.ActionContext"
+importJava "org.simantics.simulation.sequences.action.StopReason" where
+ data StopReason
+ STOPPED :: StopReason
+ SIMULATION_DID_NOT_START :: StopReason
+ DIVERGED :: StopReason
+ INTERRUPTED :: StopReason
+
importJava "org.simantics.simulation.sequences.action.ActionContext" where
data ActionContext
scheduleNow :: (() -> <Action,Proc> a) -> <Action> ()
scheduleNextStep :: (() -> <Action,Proc> a) -> <Action> ()
scheduleAt :: Double -> (() -> <Action,Proc> a) -> <Action> ()
+ scheduleWhenStopped :: (StopReason -> <Action,Proc> a) -> <Action> ()
@JavaName stop
stop_ :: <Action> ()
execute :: (<Action,Proc> a) -> Sequence a
execute action = Sequence (\cont -> cont action)
+@inline
+executeWhenStopped :: (StopReason -> <Action,Proc> a) -> Sequence ()
+executeWhenStopped handler = execute (scheduleWhenStopped handler)
+
"""
The sequence `fork seq` is an instantious sequence that creates a new sequence thread behaving like the sequence `seq`.
"""