Skip to content

Commit c3955b7

Browse files
committed
Remove deprecated status method
1 parent e05d498 commit c3955b7

File tree

3 files changed

+0
-28
lines changed

3 files changed

+0
-28
lines changed

lib/concurrent/executor/java_thread_pool_executor.rb

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -149,15 +149,6 @@ def remaining_capacity
149149
@max_queue == 0 ? -1 : @executor.getQueue.remainingCapacity
150150
end
151151

152-
# This method is deprecated and will be removed soon.
153-
# This method is supost to return the threads status, but Java API doesn't
154-
# provide a way to get the thread status. So we return an empty Array instead.
155-
def status
156-
warn '[DEPRECATED] `status` is deprecated and will be removed soon.'
157-
warn "Calls to `status` return an empty Array. Java ThreadPoolExecutor does not provide thread's status."
158-
[]
159-
end
160-
161152
# Is the thread pool running?
162153
#
163154
# @return [Boolean] `true` when running, `false` when shutting down or shutdown

spec/concurrent/executor/cached_thread_pool_shared.rb

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -95,15 +95,6 @@
9595
end
9696
end
9797

98-
context '#status' do
99-
100-
it 'returns an array' do
101-
skip 'not added' unless subject.respond_to? :status
102-
allow(subject).to receive(:warn)
103-
expect(subject.status).to be_kind_of(Array)
104-
end
105-
end
106-
10798
context '#idletime' do
10899

109100
subject{ described_class.new(idletime: 42) }

spec/concurrent/executor/fixed_thread_pool_shared.rb

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -145,16 +145,6 @@
145145
end
146146
end
147147

148-
context '#status' do
149-
150-
it 'returns an array' do
151-
skip 'not added' unless subject.respond_to? :status
152-
allow(subject).to receive(:warn)
153-
expect(subject.status).to be_kind_of(Array)
154-
end
155-
end
156-
157-
158148
context '#kill' do
159149

160150
it 'attempts to kill all in-progress tasks' do

0 commit comments

Comments
 (0)