Ideally, I would like to add my blocking queue to the selector so that I can block reading from the socket or until an element appears in the blocking queue.
Is there a higher level selector function that works with disparate types?
I could exit the crappy exit and disable 2 threads and each one individually, but it would be easier to have one function that could block both types of objects.
Is there a way to capture a monitor for every object that is locked and use a selector object to lock on both?
source
share