require_relative 'executor'

module Concurrent
  class ImmediateExecutor
    include Executor

    def post(*args, &task)
      raise ArgumentError.new('no block given') unless block_given?
      task.call(*args)
      return true
    end
  end
end

module Concurrent
  class ImmediateExecutor

    def post(*args, &task)
      raise ArgumentError.new('no block given') unless block_given?
      task.call(*args)
      return true
    end

    def <<(task)
      post(&task)
      self
    end
  end
end

Reset ImmediateExecutor to original state.
Reset ImmediateExecutor to original state.
