Core Function ThreadName
From Sputnik Wiki
(Difference between revisions)
(Created page with "<pre> ThreadName( ) </pre> === Description === Returns the name of the current thread that is executing this code === Parameters === None === Return Value === Success: Retu...") |
m (1 revision) |
(One intermediate revision by one user not shown) |
Latest revision as of 12:38, 14 June 2015
ThreadName( )
Contents |
Description
Returns the name of the current thread that is executing this code
Parameters
None
Return Value
Success: Returns the name of the current thread.
Failure: Returns an empty string.
Remarks
None.
Example
ThreadCreate("th1", "ThreadFunc();"); ThreadCreate("th2", "ThreadFunc();"); ThreadCreate("th3", "ThreadFunc();"); inputc(); Function ThreadFunc() { while(true) { println("Hello from thread '" . ThreadName() . "'"); sleep(1000); } }