Skip to content

Commit 5495f9d

Browse files
committed
Remove current_length alias
1 parent 349c46e commit 5495f9d

File tree

5 files changed

+3
-12
lines changed

5 files changed

+3
-12
lines changed

lib/concurrent/executor/java_thread_pool_executor.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,6 @@ def max_length
104104
def length
105105
@executor.getPoolSize
106106
end
107-
alias_method :current_length, :length
108107

109108
# The largest number of threads that have been created in the pool since construction.
110109
#

lib/concurrent/executor/ruby_thread_pool_executor.rb

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,8 +131,6 @@ def remaining_capacity
131131
end
132132
end
133133

134-
alias_method :current_length, :length # TODO remove?
135-
136134
# @api private
137135
def remove_busy_worker(worker)
138136
mutex.synchronize { ns_remove_busy_worker worker }

spec/concurrent/executor/fixed_thread_pool_shared.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@
168168
pool = described_class.new(5)
169169
100.times{ pool << proc{ sleep(1) } }
170170
sleep(0.1)
171-
expect(pool.current_length).to eq 5
171+
expect(pool.length).to eq 5
172172
pool.kill
173173
end
174174
end

spec/concurrent/executor/ruby_fixed_thread_pool_spec.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,10 @@ module Concurrent
2727

2828
it 'creates new workers when there are none available' do
2929
pool = described_class.new(5)
30-
expect(pool.current_length).to eq 0
30+
expect(pool.length).to eq 0
3131
5.times{ pool << proc{ sleep(1) } }
3232
sleep(0.1)
33-
expect(pool.current_length).to eq 5
33+
expect(pool.length).to eq 5
3434
pool.kill
3535
end
3636
end

spec/concurrent/executor/thread_pool_shared.rb

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -47,12 +47,6 @@
4747
subject.wait_for_termination(1)
4848
expect(subject.length).to eq 0
4949
end
50-
51-
it 'aliased as #current_length' do
52-
5.times{ subject.post{ sleep(0.1) } }
53-
sleep(0.1)
54-
expect(subject.current_length).to eq subject.length
55-
end
5650
end
5751

5852
context '#scheduled_task_count' do

0 commit comments

Comments
 (0)