In my program i am creating 2 tasks. These tasks implement the Callable interface. I am passing these to 2 threads to execute Thread pool class. My question is will these 2 threads start in same time? In java concurrency programming do all threads will start at same time?
In my program i am creating 2 tasks. These tasks implement the Callable interface.
Share
No they won’t. There is nothing you can do with conventional Java SE to force two threads to start at the same time. (Indeed, if you don’t have a multi-core processor, it is physically impossible for two threads to start at the same time.)