Muq MUF provides pre-emptive multitasking facilities which are in some respects comparable to threads provided by Unix: Each user may have multiple jobs scheduled to run (or waiting on I/O) at any given time, each with its own call and evaluation stack. Execution of ready-to-run jobs is interleaved in an attempt to give each user an equal share of available processing power. Jobs are organized into jobsets similar to Unix process groups, which in turn are organized into sessions corresponding roughly to a single user login: Usually each session is associated with a single Socket object and vice versa. Jobs, jobsets and sessions may be created via fork primitives and killed by signals. Jobs may be moved in and out of jobqueues under softcode control, allowing high-level scheduling algorithms to be coded in-db.
MUF functions use @
to get a pointer to the job executing
them. As usual, lss
is your friend:
root: @ lss :dbname "ROOTDB" :isA #<MosClass Job 3f9fd15> :myclass "job" :owner #<Root root 2c015> :lib #<Index .u.roo%s.lib 91e915> :package #<Package root 422a15> :name 3 :compiler #<an ephemeral context> :muqnetIo 0 :pid 3 :standardOutput #<MessageStream _ caee15> :standardInput #<MessageStream _ caee15> :killStandardOutputOnExit nil :errorOutput #<MessageStream _ caee15> :promiscuousNoFragments 0 :doingPromiscuousRead nil :debugIo #<MessageStream _ caee15> :dataStack #<DataStack _ 2b51e815> :breakOnSignal nil :breakEnable nil :breakDisable nil :actualUser #<Root root 2c015> :actingUser #<Root root 2c015> :endJob 0 :doSignal 'muf:]doSignal :doError #:doError :debuggerHook nil :debugger 'debug:mufDebugger :doBreak 'muf:]doBreak :variableBindings 0 :traceOutput #<MessageStream _ caee15> :terminalIo #<MessageStream _ caee15> :state "1" :stackBottom 1 :spareCompileMessageStream 0 :spareAssembler 0 :sleepUntilMillisec 0 :root #<DatabaseFile ROOTDB 24815> :task 0 :reportEvent #:reportEvent :readtable #<ReadTable _ 37b15> :readNilFromDeadStreams nil :queryIo #<MessageStream _ caee15> :priority 1 :parentJob #<Job jb0 33115> :opCount 2971 :loopStack #<LoopStack _ 2b49ea15> :jobSet #<JobSet _ 17d22615> :here #<Root root 2c015> :group 0 :functionBindings 0 :ephemeralVectors 0 :ephemeralStructs 74 :ephemeralObjects 0 :ephemeralList 0 root:
Go to the first, previous, next, last section, table of contents.