A thread is a unit of concurrent execution. When a thread is created, it
continues processing on the XVM until either it performs a read operation
that blocks on input or when it explicitly calls yield. All XOCL values
implement the yield operation. In both cases the thread is said to
yield control. When a thread yields control, the XOS schedules another
thread that is waiting. The scheduling algorithm aims to ensure that all
waiting threads get scheduled providing that they yield.
Constructors |
Attributes | ||
Operations | |
asSeq():Seq(Thread) | Returns all the threads in the system by chaining down the linked list of threads from the receiver. |
id():Integer | No Documentation Specified |
kill():Element | A thread can commit suicide by calling this operation on itself. |
next():Thread | Returns the thread that will be scheduled next. |
sleep():Element | Sets the live-status of the receiver to SLEEP. The receiver cannot be rescheduled until it has been woken up. |
state():Integer | Returns the live-status of the receiver. |
stateString():String | Returns the live-status of the receiver as a symbolic string. |
toString():String | No Documentation Specified |
wake(result:Element):Element | Changes the live-status of the receiver to be ACTIVE and therefore ready for rescheduling. |
From Element: pprint, pprint, pprint, writeXMLFile, writeXMLFile, writeXML, lift, toSnapshot, toSnapshot, allHTMLEntries, allHTMLPackages, toHTML, writeHTML, writeHTML, writeHTMLAllEntries, writeHTMLAllPackages, writeHTMLIndex, writeHTMLOverview, yield, toString, systemId, setOf, send, save2, save, removeDaemon, removeDaemon, println, print, oclIsKindOf, oclIsTypeOf, noOperationFound, isTypeOf, isReallyKindOf, init, init, of, isKindOf, addTo, checkConstraints, copy, deleteRecursive, die, edit, equals, error, ferror, hashCode. |