Each thread is associated with an instance of the classThread. There are two basic strategies for usingThreadobjects to create a concurrent application.This section documents the use of
- To directly control thread creation and management, simply instantiate
Threadeach time the application needs to initiate an asynchronous task.- To abstract thread management from the rest of your application, pass the application's tasks to an executor.
Threadobjects. Executors are discussed with other high-level concurrency objects.