Ideally I'd like to add my blocking queue to a selector so I can block reading from a socket or until an item appears on the blocking queue.
Is there some higher level selector-like function that operates on disparate types like these?
I could go the cheesy way out and fire off 2 threads and have each one block individually, but it would be cleaner to have one function that could block on both types of object.
Is there a way to grab the monitor for each object that is being blocked on and use a selector-like object to block on both?