class Concurrent::Delay

def execute_task_once

def execute_task_once
  if @state == :pending
    begin
      @value = @task.call
      @state = :fulfilled
    rescue => ex
      @reason = ex
      @state = :rejected
    end
  end
end