lib/mutant/actor/receiver.rb in mutant-0.8.0 vs lib/mutant/actor/receiver.rb in mutant-0.8.1
- old
+ new
@@ -7,11 +7,10 @@
# Receives a message, blocking
#
# @return [Object]
#
# @api private
- #
def call
2.times do
message = try_blocking_receive
return message unless message.equal?(Undefined)
end
@@ -27,10 +26,9 @@
#
# @return [Object]
# if there is a message
#
# @api private
- #
def try_blocking_receive
mutex.synchronize do
if messages.empty?
condition_variable.wait(mutex)
Undefined