Libraries anvil runtime Thread

class Thread
extends anvil.lang.object
A thread is a thread of execution in a program. Multiple threads of execution may be running concurrently.

Constructor
Thread()
Thread(string name)
Creates new thread.


Constants

constant MAX_PRIORITY

constant MIN_PRIORITY

constant NORMAL_PRIORITY


Methods

string getName()
Returns the name of this thread.

int getPriority()
Returns the priority setting for this thread.

Thread interrupt()
Interrupts this thread, possibly generating Interrupted, or InterruptedIO exception in currently pending operation in this thread.

boolean interrupted()
Checks if this thread has been interrupted. Interrupted status is cleared when this method is called.

boolean isAlive()
Checks if this thread is still alive.

boolean isDaemon()
Checks if this thread is marked as daemon.

boolean isInterrupted()
Checks if this thread has been interrupted. Interrupted status is NOT cleared when this method is called.

Thread join()
Waits indefinitly for this thread to terminate.
Thread join(int millis)
Waits at most specified milliseconds for this thread to terminate.
Thread join(int millis, int nanos)
Waits at most specified milli- and nanoseconds for this thread to terminate.
Throws Interrupted -  if another thread has interrupted the current thread.

Thread setDaemon(boolean isDaemon)
Sets the daemon status of this thread.
Throws BadState -  If this thread is active

Thread setName(string name)
Sets the name of this thread.

Thread setPriority(int priority)
Sets the priority for this thread.

Thread start(Function callable, ..parameters)
Starts the execution of thread.
Throws BadState -  If thread is already started