Core Function ThreadName

From Sputnik Wiki
(Difference between revisions)
Jump to: navigation, search
(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)

Revision as of 21:40, 11 August 2014

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);
	}
}
Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox