public class Executors extends Object
Executor
and ExecutorService
implementations.Modifier and Type | Method and Description |
---|---|
static Executor |
directExecutor()
Return a direct executor.
|
static ExecutorService |
newDirectExecutorService()
Creates a more
ExecutorService that runs the passed task in the calling thread. |
static ExecutorService |
newDirectExecutorServiceWithNoOpShutdown()
Creates a new
ExecutorService that runs the passed tasks in the calling thread but
doesn't implement proper shutdown behavior. |
public static Executor directExecutor()
public static ExecutorService newDirectExecutorService()
ExecutorService
that runs the passed task in the calling thread.public static ExecutorService newDirectExecutorServiceWithNoOpShutdown()
ExecutorService
that runs the passed tasks in the calling thread but
doesn't implement proper shutdown behavior. Tasks can be still submitted even after ExecutorService.shutdown()
is called.newDirectExecutorService()
Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.