class Concurrent::Promise
def realize(task)
def realize(task) @executor.post do success, value, reason = SafeTaskExecutor.new(task).execute children_to_notify = mutex.synchronize do set_state!(success, value, reason) @children.dup end children_to_notify.each { |child| notify_child(child) } end end