ShofarNexus uses a cooperative tasking model. This allows the running task to not have to be concerned about shared resources as required with a preemptive model. It does require that task return quickly and not pause which places the burden of managing long running tasks on the task itself. The active work item is a Computer_Run.
A Computer_Run is generated and then the next thing to do is found in a Queue. A small number of queues exist and the highest priority is made active.
The Computer_Run's Branch is typically not saved and will be discarded shortly after the run.
A Task will have a Verb assigned to it that defines the work to do.
The “Run” defined in the Verb is executed and the run will be completed.
The Run can only do things that can occur immediately. When waiting may occur it is the responsibility of the Task to end the Run until the waiting is completed.
Task_Belts contain references to the active or previous Run_Items.
A Task_Belt will always have the last 50 related Run_Items.
A Computer_Run will remain in existence in memory during execution and as long as a Task_Belt has a reference to it.
Once completed, a Computer_Run may discard some of its data in the Branch, such a the Build_List, since it may consume significant memory.