We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent db803ee commit 6dcdd1aCopy full SHA for 6dcdd1a
lib/concurrent/atomic/semaphore.rb
@@ -153,6 +153,12 @@ def try_acquire_timed(permits, timeout)
153
if RUBY_PLATFORM == 'java'
154
155
# @!macro semaphore
156
+ #
157
+ # A counting semaphore. Conceptually, a semaphore maintains a set of permits. Each {#acquire} blocks if necessary
158
+ # until a permit is available, and then takes it. Each {#release} adds a permit,
159
+ # potentially releasing a blocking acquirer.
160
+ # However, no actual permit objects are used; the Semaphore just keeps a count of the number available and
161
+ # acts accordingly.
162
class JavaSemaphore
163
# @!macro semaphore_method_initialize
164
def initialize(count)
0 commit comments