Skip to content

Commit 5e1e1e9

Browse files
committed
Use name __Waiters__ instead of RbxWaiters
- to be consistent with other Synchronization::AbstractObject implementations
1 parent 24a6c42 commit 5e1e1e9

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

lib/concurrent/synchronization/rbx_object.rb

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@ module Concurrent
22
module Synchronization
33

44
if Concurrent.on_rbx?
5-
5+
66
# @!visibility private
77
# @!macro internal_implementation_note
88
class RbxObject < AbstractObject
99
def initialize
10-
@RbxWaiters = []
10+
@__Waiters__ = []
1111
ensure_ivar_visibility!
1212
end
1313

@@ -21,29 +21,29 @@ def ns_wait(timeout = nil)
2121
wchan = Rubinius::Channel.new
2222

2323
begin
24-
@RbxWaiters.push wchan
24+
@__Waiters__.push wchan
2525
Rubinius.unlock(self)
2626
signaled = wchan.receive_timeout timeout
2727
ensure
2828
Rubinius.lock(self)
2929

30-
if !signaled && !@RbxWaiters.delete(wchan)
30+
if !signaled && !@__Waiters__.delete(wchan)
3131
# we timed out, but got signaled afterwards,
3232
# so pass that signal on to the next waiter
33-
@RbxWaiters.shift << true unless @RbxWaiters.empty?
33+
@__Waiters__.shift << true unless @__Waiters__.empty?
3434
end
3535
end
3636

3737
self
3838
end
3939

4040
def ns_signal
41-
@RbxWaiters.shift << true unless @RbxWaiters.empty?
41+
@__Waiters__.shift << true unless @__Waiters__.empty?
4242
self
4343
end
4444

4545
def ns_broadcast
46-
@RbxWaiters.shift << true until @RbxWaiters.empty?
46+
@__Waiters__.shift << true until @__Waiters__.empty?
4747
self
4848
end
4949

0 commit comments

Comments
 (0)