Fix actor receiver to use private attr getters instead of ivars
* Ivars lead to typos being caught late. Typos on send get caught early.
This commit is contained in:
parent
4ff4d65939
commit
95a20bdeae
1 changed files with 5 additions and 5 deletions
|
@ -31,14 +31,14 @@ module Mutant
|
|||
# @api private
|
||||
#
|
||||
def try_blocking_receive
|
||||
@mutex.lock
|
||||
if @mailbox.empty?
|
||||
@mutex.unlock
|
||||
mutex.lock
|
||||
if mailbox.empty?
|
||||
mutex.unlock
|
||||
Thread.stop
|
||||
Undefined
|
||||
else
|
||||
@mailbox.shift.tap do
|
||||
@mutex.unlock
|
||||
mailbox.shift.tap do
|
||||
mutex.unlock
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue