View Full Version : Terminating a Thread
Jawahar
06-22-04, 05:17 PM
To my understanding, MACHINE-CHAINs are used for Multi-Threading in IsoMax. STATE-MACHINEs defined in a MACHINE-CHAIN run in parallel.
Now, how do I terminate any of these STATE-MACHINES on evaluation of a CONDITION? Also, how do I re-start a STATE-MACHINE after some other CONDITION fires?
Thanks.
RMDumse
06-22-04, 05:29 PM
It is possible to dynamically reassign which machine chain is active on the fly, but this is a bit beyond the norm for the IsoStructure idea.
Machines are thought of like hardware. As such, they may be idle, but they never "terminate."
For a parallel consider your transmission. When you shift out of 1st gear, 1st gear is idle, not used. But you don't drop the gears out of the transmission until you need to shift down again, then reinstall them.
Generally, the way to terminate an inactive state machine would be to have it go into a state that has no transitions out. Then it will be idle. It still is checked every schedule runs time, but finding no transitions associated with that state, it runs very very fast, and is not really worth removing.
Another statemachine or process could reactivate an idle state by forcing it to a given state, usually an initialization state. This is done in a master-slave control mode, with the <state-name> SET-STATE command. So the transition on an different machine could control the change-of-state of an idled machine.
Jawahar
06-23-04, 12:30 AM
Thats a perfect comparison that you made! Being a stick-shifter myself, now I understand the concept well.
Thanks for your time!
vBulletin v3.0.7, Copyright ©2000-2012, Jelsoft Enterprises Ltd.