\section{THREADNEW Create a New Thread}

\subsection{Usage}

The \verb|threadnew| function creates a new FreeMat thread, and
returns a handle to the resulting thread.   The \verb|threadnew|
function takes no arguments.  They general syntax for the
\verb|threadnew| function is
\begin{verbatim}
   handle = threadnew
\end{verbatim}
Once you have a handle to a thread, you can start the thread
on a computation using the \verb|threadstart| function.  The
threads returned by \verb|threadnew| are in a dormant state (i.e.,
not running).  Once you are finished with the thread you
must call \verb|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 \verb|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.
