The following blocking operations are virtual thread friendly in the current prototype; these methods do not pin the carrier thread when the operation blocks.
|java.net.Socket||connect, read, write|
|java.net.DatagramSocket/MulticastSocket||receive||send does not block|
|java.nio.channels.SocketChannel||connect, read, write||socket adaptor connect, read, and write also okay|
|java.nio.channels.ServerSocketChannel||accept||socket adaptor accept also okay|
socket adaptor receive also okay
write and send do not block
|java.net.InetAddress||getByName, getAllByName, ..|
These methods currently off load name/address resolution to a background thread pool where threads block in the underlying NSS/equivalent. An alternative name service implementation for InetAddress is being developed in the sandbox (aefimov-dns-client-branch) that will be virtual thread friendly.
The following blocking operations are not currently virtual thread friendly; these methods pin the carrier thread when the operation blocks.
|java.nio.channels.Selector||select||Selection operations are specified to synchronize on the selector and the selected-key set. May not be a concern as code using fibers should not need to use non-blocking I/O and Selectors.|