/usr/share/freemat/help/text/threadnew.mdc is in freemat-help 4.0-5.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | THREADNEW THREADNEW Create a New Thread
Usage
The threadnew function creates a new FreeMat thread, and
returns a handle to the resulting thread. The threadnew
function takes no arguments. They general syntax for the
threadnew function is
handle = threadnew
Once you have a handle to a thread, you can start the thread
on a computation using the threadstart function. The
threads returned by threadnew are in a dormant state (i.e.,
not running). Once you are finished with the thread you
must call threadfree to free the resources associated with
that thread.
Some additional important information. Thread functions operate
in their own context or workspace, which means that data cannot
be shared between threads. The exception is global variables,
which provide a thread-safe way for multiple threads to share data.
Accesses to global variables are serialized so that they can
be used to share data. Threads and FreeMat are a new feature, so
there is room for improvement in the API and behavior. The best
way to improve threads is to experiment with them, and send feedback.
|