thread.isSleeping

Syntax thread.isSleeping (id)

Params id is the numeric id of the thread whose state you wish to determine.

Action Determines whether the indicated thread is sleeping or not.

Returns True if the specified thread is sleeping, false otherwise.

Examples thread.isSleeping (104)

   » true

thread.isSleeping (thread.getCurrentID ())

   » false

thread.isSleeping (999)

   » error: The thread whose ID is 999 does not exist.

Errors It is an error to specify a nonexistent thread id.

Notes Thread ids can be obtained from other thread verbs, or by examining the system.compiler.threads table.

See Also thread.evaluate

thread.getNthID

system.compiler.threads

Discuss