wood burning stoves 2.0
The moose likes Spring and the fly likes TaskExecutor.exucute(Runnable) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Spring
Bookmark "TaskExecutor.exucute(Runnable)" Watch "TaskExecutor.exucute(Runnable)" New topic


Rakesh Basani
Ranch Hand

Joined: Jun 04, 2012
Posts: 38
hi guys..

I am stuck with one doubt. In general Threads concept, if we call Thread.start() two times continuously then the second Thread.start() will throw IllegalStateExeception.
In the same way when I call TaskExecutor.execute(Runnable) two times continuously, its not throwing any exception.. Please clarify me..

Thanks in advance.
Bill Gorder

Joined: Mar 07, 2010
Posts: 1682

You are comparing an Executor to a Thread. They are not the same.

When calling Thread.start() two times you are trying to start the same thread twice this is not what happens when you call TaskExecutor.execute(Runnable) twice.

Please read the relevant part of the documentation and if that does not clear it up, post back with any questions.


[How To Ask Questions][Read before you PM me]
I agree. Here's the link: http://aspose.com/file-tools
subject: TaskExecutor.exucute(Runnable)
It's not a secret anymore!