Functional Area : Thread Programming

A thread is declared similar to function except for the keyword to be thread . A thread can be anonyous which is started directly. To start a thread, use start thread statement. The parameters are passed and handled the same way as in functions.

Threads run in their own contexts. The global context and global variables are shared by all threads. Accesses to global variables may cause problems without approppriate synchronization. The lock() and unlock() are designed to protected shared variable accesses. Threads can synchronize with each other with waitFor(), notify() and notifyAll().

Related Functional Areas

Related Syntax

Related System Functions