Does Java provide an ExecutorService which allows a worker to execute on the same thread?

It sounds like what you actually want are actors . Put simply, an actor is an object that runs in a single thread and has a "mailbox" of tasks that it's responsible for processing sequentially. Akka seems to be the current leading library/framework providing actors on the JVM.

Take a look over there. There's also another SO answer that lists several alternatives for actors in Java.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions