Thread

extends Node

A Thread represents a thread or path of exection in a program.

Constructors

Thread other, Node deep throw new RuntimeException("Cannot copy Thread"); thread = new Thread(this);

Type Functions

daemon(Node on)

Set whether this is a daemon thread or not. Daemon threads are background threads, they are automatically killed when no other threads remain.

Parameter on: True if this should be a daemon thread, otherwise false.

Returns: This Thread.

daemon()

Determine if this is a daemon (background) thread.

priority(Node order)

Decide what priority this Thread should have over others. Higher priority means precedence over other threads. Useable values are between 1 (for low priority) and 10 (for highest priority).

Parameter order: The new thread priority.

Returns: This Thread.

priority()

Determine what priority this Thread has over others.

return()

Wait for this Thread to finish executing and get the result.

Returns: The nodeset resulting from running this Threads run() function.

run()

Default implementation of run(), does nothing.

sleep(Node millis)

Put this Thread to sleep for millis milliseconds.

start()

Start this Thread and execute its run() function.

wait()

Wait for this Thread to finish executing.

yield()

Allow other Threads to execute, momentarily, ahead of this one.

Functions inherited from Node