<thread>

The class representing a thread of control executing a function.

The function is called with no arguments in the empty dynamic environment of the new thread.  The thread terminates when the function returns.

The function is executable immediately.  You can suspend a new thread (almost) immediately on creation by arranging for it to synchronize on an unavailable resource upon entry to the function.

The optional priority keyword provides a scheduling priority for the thread.  The higher the value, the greater the priority.  The default value is zero, which is also the value of the constant $normal-priority, one of several constants that correspond to useful priority levels.  The library offers no way to change the priority of a thread dynamically.

The following constants, listed in order of increasing value, may be useful as values for the optional priority keyword.

The name keyword is a string that is used as the function’s name for convenience purposes, such as debugging.

Exported from

Modifiers

concrete free sealed

Make keywords

functionAn instance of <function>.  Required.  The function must not have any required arguments.
nameAn instance of <string> or #f.  The default is #f.
priorityAn instance of <integer>.  The default is $normal-priority.

Superclasses

Functions on <thread>

Functions returning <thread>

A constant.
A constant.
A constant.
A constant.
A constant.
The Runtime-Threads module.
The threads module.
The class of objects that can be applied to arguments.
The class of sequences with elements that are characters.
The class of integers.
The class of all Dylan objects.
Waits for another, existing, thread to terminate, by blocking if necessary, and then returns the values of its function.
Returns the name of a thread.
Returns the current thread.