File tree Expand file tree Collapse file tree 1 file changed +41
-7
lines changed
lib/concurrent/collection Expand file tree Collapse file tree 1 file changed +41
-7
lines changed Original file line number Diff line number Diff line change @@ -292,14 +292,48 @@ def self.from_list(list, opts = {})
292
292
queue
293
293
end
294
294
end
295
+ end
295
296
296
- # @!macro priority_queue
297
- class PriorityQueue < JavaPriorityQueue
298
- end
299
- else
297
+ PriorityQueueImplementation = case
298
+ when Concurrent . on_jruby?
299
+ JavaPriorityQueue
300
+ else
301
+ MutexPriorityQueue
302
+ end
303
+ private_constant :PriorityQueueImplementation
304
+
305
+ # @!macro priority_queue
306
+ class PriorityQueue < PriorityQueueImplementation
307
+
308
+ # @!method initialize(opts = {})
309
+ # @!macro priority_queue_method_initialize
310
+
311
+ # @!method clear
312
+ # @!macro priority_queue_method_clear
313
+
314
+ # @!method delete(item)
315
+ # @!macro priority_queue_method_delete
316
+
317
+ # @!method empty?
318
+ # @!macro priority_queue_method_empty
319
+
320
+ # @!method include?(item)
321
+ # @!macro priority_queue_method_include
322
+
323
+ # @!method length
324
+ # @!macro priority_queue_method_length
325
+
326
+ # @!method peek
327
+ # @!macro priority_queue_method_peek
328
+
329
+ # @!method pop
330
+ # @!macro priority_queue_method_pop
331
+
332
+ # @!method push(item)
333
+ # @!macro priority_queue_method_push
334
+
335
+ # @!method self.from_list(list, opts = {})
336
+ # @!macro priority_queue_method_from_list
300
337
301
- # @!macro priority_queue
302
- class PriorityQueue < MutexPriorityQueue
303
- end
304
338
end
305
339
end
You can’t perform that action at this time.
0 commit comments