Core Function ThreadResume
From Sputnik Wiki
(Difference between revisions)
(Created page with "<pre> ThreadResume( <name> ) </pre> === Description === Unfreeze a thread and allow it to continue execution === Parameters === ==== name ==== Name of a thread to resume. =...") |
m (1 revision) |
(One intermediate revision by one user not shown) |
Latest revision as of 12:38, 14 June 2015
ThreadResume( <name> )
Contents |
Description
Unfreeze a thread and allow it to continue execution
Parameters
name
Name of a thread to resume.
Return Value
Success: Returns 1.
Failure: Returns 0.
Remarks
None
Example
ThreadCreate("th1", "ThreadFunc();"); ThreadCreate("th2", "ThreadFunc();"); ThreadCreate("th3", "ThreadFunc();"); println("Lets sleep 2 seconds..."); sleep(2000); println("Lets make thread 2 sleep..."); ThreadSleep("th2"); println("Thread 2 is sleeping.... Now lets sleep for 3 seconds"); sleep(3000); ThreadResume("th2"); println("Thread 2 is now resumed"); inputc(); Function ThreadFunc() { while(true) { println("Hello from thread '" . ThreadName() . "'"); sleep(500); } }