class Concurrent::RubyExecutorService

def post(*args, &task)

def post(*args, &task)
  raise ArgumentError.new('no block given') unless block_given?
  deferred_action = synchronize {
    if running?
      ns_execute(*args, &task)
    else
      fallback_action(*args, &task)
    end
  }
  if deferred_action
    deferred_action.call
  else
    true
  end
end