File tree Expand file tree Collapse file tree 4 files changed +10
-10
lines changed
lib/concurrent/synchronization Expand file tree Collapse file tree 4 files changed +10
-10
lines changed Original file line number Diff line number Diff line change @@ -28,7 +28,7 @@ class AbstractObject
28
28
29
29
# @abstract for helper ivar initialization if needed,
30
30
# otherwise it can be left empty. It has to call ns_initialize.
31
- def initialize ( * args , & block )
31
+ def initialize
32
32
raise NotImplementedError
33
33
end
34
34
Original file line number Diff line number Diff line change 1
1
module Concurrent
2
2
module Synchronization
3
3
class MonitorObject < MutexObject
4
- def initialize ( * args , & block )
4
+ def initialize
5
5
@__lock__ = ::Monitor . new
6
6
@__condition__ = @__lock__ . new_cond
7
7
end
Original file line number Diff line number Diff line change 1
1
module Concurrent
2
2
module Synchronization
3
3
class MutexObject < AbstractObject
4
- def initialize ( * args , & block )
4
+ def initialize
5
5
@__lock__ = ::Mutex . new
6
6
@__condition__ = ::ConditionVariable . new
7
7
end
Original file line number Diff line number Diff line change @@ -2,8 +2,8 @@ module Concurrent
2
2
module Synchronization
3
3
if Concurrent . on_rbx?
4
4
class RbxObject < AbstractObject
5
- def initialize ( * args , & block )
6
- @waiters = [ ]
5
+ def initialize
6
+ @Waiters = [ ]
7
7
ensure_ivar_visibility!
8
8
end
9
9
@@ -17,29 +17,29 @@ def ns_wait(timeout = nil)
17
17
wchan = Rubinius ::Channel . new
18
18
19
19
begin
20
- @waiters . push wchan
20
+ @Waiters . push wchan
21
21
Rubinius . unlock ( self )
22
22
signaled = wchan . receive_timeout timeout
23
23
ensure
24
24
Rubinius . lock ( self )
25
25
26
- if !signaled && !@waiters . delete ( wchan )
26
+ if !signaled && !@Waiters . delete ( wchan )
27
27
# we timed out, but got signaled afterwards,
28
28
# so pass that signal on to the next waiter
29
- @waiters . shift << true unless @waiters . empty?
29
+ @Waiters . shift << true unless @Waiters . empty?
30
30
end
31
31
end
32
32
33
33
self
34
34
end
35
35
36
36
def ns_signal
37
- @waiters . shift << true unless @waiters . empty?
37
+ @Waiters . shift << true unless @Waiters . empty?
38
38
self
39
39
end
40
40
41
41
def ns_broadcast
42
- @waiters . shift << true until @waiters . empty?
42
+ @Waiters . shift << true until @Waiters . empty?
43
43
self
44
44
end
45
45
You can’t perform that action at this time.
0 commit comments