If the promised chore is not yet
complete, then do the work
synchronously. We will wait.
# File lib/rake/promise.rb, line 28
def value
unless complete?
stat :sleeping_on, :item_id => object_id
@mutex.synchronize do
stat :has_lock_on, :item_id => object_id
chore
stat :releasing_lock_on, :item_id => object_id
end
end
error? ? raise(@error) : @result
end