What are Threads?
- Threads are smallest unit of execution in a program. It is similar to process but a process can have many threads.
- Same address space is shared among all the Threads. 2,164 more words
Here, we are creating fixed size thread pool of 5 worker threads. Then we are submitting 10 jobs to this pool, since the pool size is 5, it will start working on 5 jobs and other jobs will be in wait state and will be added in queue. 1,012 more words