THREADWAIT


Waits for a thread to finish execution and releases the thread handle

Syntax:
Declare Sub ThreadWait ( Byval id As Any Ptr )

Usage:
ThreadWait( id )

Parameters:
id
Any Ptr handle of a thread created by ThreadCreate or ThreadCall

Description:
ThreadWait waits for a thread created by ThreadCreate or ThreadCall to finish execution, and then releases the resources associated with the thread handle. ThreadWait does not return until the thread designated by id ends.
During the wait, no CPU time is consumed by the caller.

In order to release a thread handle without waiting for the thread to finish, use ThreadDetach.

ThreadWait does not force the thread to end; if a thread requires a signal to force its end, a mechanism such as shared variables and mutexes must be used.

Examples:
See the Threadcreate examples.

Dialect Differences:
Platform Differences:
Differences from QB:
See also:
Back to Threading Support Functions
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki



sf.net phatcode