类 SerializingExecutor

  • 所有已实现的接口:
    Runnable, Executor

    public final class SerializingExecutor
    extends Object
    implements Executor, Runnable
    Executor ensuring that all Runnable tasks submitted are executed in order using the provided Executor, and serially such that no two will ever be running at the same time.
    • 构造器详细资料

      • SerializingExecutor

        public SerializingExecutor​(Executor executor)
        Creates a SerializingExecutor, running tasks using executor.
        参数:
        executor - Executor in which tasks should be run. Must not be null.
    • 方法详细资料

      • execute

        public void execute​(Runnable r)
        Runs the given runnable strictly after all Runnables that were submitted before it, and using the executor passed to the constructor. .
        指定者:
        execute 在接口中 Executor
      • run

        public void run()
        指定者:
        run 在接口中 Runnable