User Tools

Site Tools


resume_resume_thread_execution_.htm
Navigation:  Language Reference > 13 - Built-in Functions >====== RESUME (resume thread execution) ====== Previous pageReturn to chapter overviewNext page

NewC7.jpg

RESUME(threadno)

blk2blue.jpg

RESUME Resume thread execution.
threadno A numeric constant, variable, or expression that can be evaluated as a SIGNED integer.

The RESUME procedure restores a thread that has been suspended with the SUSPEND statement. If the threadno parameter is a number of a thread that was previously suspended by the call to SUSPEND, its suspending count is decremented. If the suspending count becomes equal to zero(0), execution of the thread continues from the point where it has been suspended. Therefore, the number of calls to RESUME must be equal to the number of calls to SUSPEND for the thread execution to resume.

RESUME can also be used to activate a new thread immediately. Normally, a procedure does not allocate memory for thread variables until the ACCEPT event handler is executed. RESUME can be used to activate a new thread directly upon procedure entry.

Example:

RESUME(ThreadNumVariable) !attempt to resume thread execution

RESUME(START(MyThreadProc)) !start a new thread immediately

See Also: SUSPEND

Launching a thread - a look behind the scenes

resume_resume_thread_execution_.htm.txt · Last modified: 2021/04/15 15:57 by 127.0.0.1