THREADFREE Free thread resources
Section: FreeMat Threads
threadfreeis a function to free the resources claimed by a thread that has finished. The syntax for its use is
handle is the handle returned by the call to
threadfree function requires that the thread be completed.
Otherwise it will wait for the thread to complete, potentially
for an arbitrarily long period of time. To fix this, you can
threadfree only on threads that are known to have
completed, or you can call it using the syntax
timeout is a time to wait in milliseconds. If the thread
fails to complete before the timeout expires, an error occurs.