java - write to socketchannel from one thread and select from other thread -


can write socketchannel 1 thread, while same socketchannel may being selected selector#select() io operations in other thread? thread-safe? or have delegate bytebuffers other thread (which selector#select() indefinitely), written socketchannel every after selector#select() calls.

also, selectionkey#interestops(int) set interest operations thread-safe? or have delegate same other thread (which selector#select() indefinitely).

yes can,in general. thread that's blocked in select() isn't using bytebuffer while it's blocked. if elsewhere, of course need synchronize, or take other measure.


Comments

Popular posts from this blog

Payment information shows nothing in one page checkout page magento -

tcpdump - How to check if server received packet (acknowledged) -