thread.getNthID

Syntax thread.getNthID (n)

Params n is the 1-based index of the desired thread.

Action Scans Frontier's thread list and determines the id of the nth entry.

Returns The numeric ID of the indicated thread.

Examples thread.getNthID (1) // the agent thread

   » 104

thread.getNthID (2) // this thread?

   » 118

Notes Unless agents are disabled, there is always at least one thread running. If you run a script that calls thread.getNthID, there will be at least two threads. The agent thread will always be the first entry in the thread list.

Sleeping threads in the thread list are counted.

The value of n must be between 1 and thread.getCount.

See Also thread.getCount

thread.getCurrentID

system.compiler.threads

Discuss