Skip to content

Commit 2de76a7

Browse files
committed
wip: Replaced instanced of 'thread pool' with 'executor' in Executor YARD doc.
1 parent 6f8ea67 commit 2de76a7

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

lib/concurrent/executor/executor.rb

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@ module Concurrent
88

99
module Executor
1010

11-
# Submit a task to the thread pool for asynchronous processing.
11+
# Submit a task to the executor for asynchronous processing.
1212
#
1313
# @param [Array] args zero or more arguments to be passed to the task
1414
#
1515
# @yield the asynchronous task to perform
1616
#
17-
# @return [Boolean] `true` if the task is queued, `false` if the thread pool
17+
# @return [Boolean] `true` if the task is queued, `false` if the executor
1818
# is not running
1919
#
2020
# @raise [ArgumentError] if no task is given
@@ -27,7 +27,7 @@ def post(*args, &task)
2727
end
2828
end
2929

30-
# Submit a task to the thread pool for asynchronous processing.
30+
# Submit a task to the executor for asynchronous processing.
3131
#
3232
# @param [Proc] task the asynchronous task to perform
3333
#
@@ -37,14 +37,14 @@ def <<(task)
3737
self
3838
end
3939

40-
# Is the thread pool running?
40+
# Is the executor running?
4141
#
4242
# @return [Boolean] `true` when running, `false` when shutting down or shutdown
4343
def running?
4444
! @stop_event.set?
4545
end
4646

47-
# Is the thread pool shutdown?
47+
# Is the executor shutdown?
4848
#
4949
# @return [Boolean] `true` when shutdown, `false` when shutting down or running
5050
def shutdown?
@@ -57,7 +57,7 @@ def shutdown
5757
def kill
5858
end
5959

60-
# Block until thread pool shutdown is complete or until `timeout` seconds have
60+
# Block until executor shutdown is complete or until `timeout` seconds have
6161
# passed.
6262
#
6363
# @note Does not initiate shutdown or termination. Either `shutdown` or `kill`
@@ -89,13 +89,13 @@ def execute(*args, &task)
8989

9090
module JavaExecutor
9191

92-
# Submit a task to the thread pool for asynchronous processing.
92+
# Submit a task to the executor for asynchronous processing.
9393
#
9494
# @param [Array] args zero or more arguments to be passed to the task
9595
#
9696
# @yield the asynchronous task to perform
9797
#
98-
# @return [Boolean] `true` if the task is queued, `false` if the thread pool
98+
# @return [Boolean] `true` if the task is queued, `false` if the executor
9999
# is not running
100100
#
101101
# @raise [ArgumentError] if no task is given
@@ -111,7 +111,7 @@ def post(*args)
111111
raise RejectedExecutionError
112112
end
113113

114-
# Submit a task to the thread pool for asynchronous processing.
114+
# Submit a task to the executor for asynchronous processing.
115115
#
116116
# @param [Proc] task the asynchronous task to perform
117117
#
@@ -121,21 +121,21 @@ def <<(task)
121121
self
122122
end
123123

124-
# Is the thread pool running?
124+
# Is the executor running?
125125
#
126126
# @return [Boolean] `true` when running, `false` when shutting down or shutdown
127127
def running?
128128
! (@executor.isShutdown || @executor.isTerminated)
129129
end
130130

131-
# Is the thread pool shutdown?
131+
# Is the executor shutdown?
132132
#
133133
# @return [Boolean] `true` when shutdown, `false` when shutting down or running
134134
def shutdown?
135135
@executor.isShutdown
136136
end
137137

138-
# Block until thread pool shutdown is complete or until `timeout` seconds have
138+
# Block until executor shutdown is complete or until `timeout` seconds have
139139
# passed.
140140
#
141141
# @note Does not initiate shutdown or termination. Either `shutdown` or `kill`
@@ -150,15 +150,15 @@ def wait_for_termination(timeout)
150150

151151
# Begin an orderly shutdown. Tasks already in the queue will be executed,
152152
# but no new tasks will be accepted. Has no additional effect if the
153-
# thread pool is not running.
153+
# executor is not running.
154154
def shutdown
155155
@executor.shutdown
156156
return nil
157157
end
158158

159159
# Begin an immediate shutdown. In-progress tasks will be allowed to
160160
# complete but enqueued tasks will be dismissed and no new tasks
161-
# will be accepted. Has no additional effect if the thread pool is
161+
# will be accepted. Has no additional effect if the executor is
162162
# not running.
163163
def kill
164164
@executor.shutdownNow

0 commit comments

Comments
 (0)