Is it safe for a task (a Runnable
) being run by an Executor to submit (execute()) a task? Can it result in deadlock, if using any of the standard Java executors
If there is a deadlock, it will be created by conditions in your deployed runnables. The ExecutorService itself is just a reusable thread pool. It handles queueing runnables for execution. There should be no reason the ExecutorService itself would be deadlocked regardless of where the Runnables originated from.