File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Threads and Synchronization and the fly likes worker thread Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Threads and Synchronization
Bookmark "worker thread" Watch "worker thread" New topic
Author

worker thread

abalfazl hossein
Ranch Hand

Joined: Sep 06, 2007
Posts: 635
A thread pool is a collection of worker threads that efficiently execute asynchronous callbacks on behalf of the application. The thread pool is primarily used to reduce the number of application threads and provide management of the worker threads.


What is difference between worker thread and application thread?
Devaka Cooray
ExamLab Creator
Saloon Keeper

Joined: Jul 29, 2008
Posts: 3273
    
  52

An application thread is a thread that is associated with the running application. In other words, you will have to wait for a completion of a task which is being handled by an application thread. Using the thread pooling pattern, you can use worker threads to do the tasks in background. In other words, a worker thread is a background thread, and often possibly a daemon thread. It runs behind the background of the application without affecting the workflow of the application. It waits for the tasks, and when a task is ready for the execution, it will be executed. The application doesn't have to wait for a worker thread. For an example, the thread that runs the Java Garbage Collection mechanism is a worker thread.


Author of ExamLab ExamLab - a free SCJP / OCPJP exam simulator
What would SCJP exam questions look like? -- Home -- Twitter -- How to Ask a Question
Jim Hoglund
Ranch Hand

Joined: Jan 09, 2008
Posts: 525
Don't read too much into the distinction between worker threads and application threads.
Both do the work of the application. Worker generally refers to a thread that is launched
or controlled by another thread; a thread that is low on the hierarchy. Application threads
kind of run the show, bossing the workers around.

Jim ... ...

BEE MBA PMP SCJP-6
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: worker thread