public class SerializingExecutor extends Object implements Executor
Refer to SynchronizationContext Refer to SerializingExecutor
| Constructor and Description |
|---|
SerializingExecutor(String name) |
SerializingExecutor(String name,
Thread.UncaughtExceptionHandler uncaughtExceptionHandler) |
| Modifier and Type | Method and Description |
|---|---|
void |
drain()
If no other thread is running this method, run all tasks in the queue in
the current thread, otherwise do nothing.
|
void |
execute(Runnable task) |
void |
executeLater(Runnable task)
Adds a task that will be run when
drain() is called. |
String |
toString() |
public SerializingExecutor(String name)
public SerializingExecutor(String name, Thread.UncaughtExceptionHandler uncaughtExceptionHandler)
public final void executeLater(Runnable task)
public final void drain()
Copyright © 2023. All rights reserved.