Hello,
suppose you implement a WebSocketServer that distributes WebSocket objects (received through onOpen) to diffferent worker threads, is it safe to call send(String...) on those from those other threads?
What about 2 threads sending in the same WebSocket?
WebSocketImpl does appear to use a BlockingQueue internally, so it should be safe, but is this safe to assume?
Also, if this is not the case, is it safe to synchronise on individual WebSocket instances, or do I have to do something special?
I tried finding something in the documentation about this, but couldn't.
Hello,
suppose you implement a WebSocketServer that distributes WebSocket objects (received through onOpen) to diffferent worker threads, is it safe to call send(String...) on those from those other threads?
What about 2 threads sending in the same WebSocket?
WebSocketImpl does appear to use a BlockingQueue internally, so it should be safe, but is this safe to assume?Also, if this is not the case, is it safe to synchronise on individual WebSocket instances, or do I have to do something special?
I tried finding something in the documentation about this, but couldn't.