Core Function ThreadName
From Sputnik Wiki
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); } }