I have three instances of Java LinkedBlockingQueue, and I would like to read them ( takeoperation) using only one stream. The naive approach is to have one thread in the queue.
LinkedBlockingQueue
take
Is there something like a UNIX system call selectto block queues in Java?
select
Thank.
Well, these BlockingQueues were really meant to serve their own threads.
-, , , Boolean s, offer() , 4 . 4- , , peek() 3, , .
Boolean
offer()
peek()
, , , , . .
Source: https://habr.com/ru/post/1755022/More articles:How to fix a memory leak caused by System.Diagnostics.PerformanceCounter - memory-leaksHow to limit my application to run only in the OS 3.0 family (or earlier), and not in OS 4.0? - iphoneHow to parse XSD file - c #PHP string externalization guidelines - phpaspnet mvc expands membership details using aspnet_users table - asp.net-membershipDesign Help - an object modifies and saves another object - design2 instances of VisualSVNServer pointing to the same SVN repo? - svnFor a4j: jsFunction, does reRender or oncomplete really happen first? - javascriptUnable to move user control registration to embedded web.config file - c #Regex for HTML with java.util.regex - javaAll Articles