posted 15 years ago
Folks,
Sorry if this sound too basic... What is the difference between a submit and an execute of a Runnable task in a ThreadPoolExecutor.
A sample code fails with a RejectedExecutionException when we attempt to use execute ( Ofcourse Calling the shutdown on the ThreadPoolExecutor )
The same code 'Seems' to work with submit... Are we lucky ? or is it some race condition or a difference between execute and submit that eludes me ?
Thanks a bunch...