• Home
    • View
    • Login
    This page
    • Normal
    • Export PDF
    • Page Information

    Loading...
  1. Dashboard
  2. Undefined Space
  3. Loom
  4. Blocking I/O

Blocking I/O

  • Created by Alan Bateman, last modified on Oct 23, 2020

The following blocking operations are virtual thread friendly; these methods do not pin the carrier thread when the operation blocks.

APIBlocking MethodsNotes
java.net.Socketconnect, read, write
java.net.ServerSocketaccept
java.net.DatagramSocket/MulticastSocketreceive



java.nio.channels.SocketChannelconnect, read, writesocket adaptor connect, read, and write also okay
java.nio.channels.ServerSocketChannelacceptsocket adaptor accept also okay
java.nio.channels.DatagramChannelread, receive

socket adaptor receive also okay

java.nio.channels.Pipe.SourceChannelread
java.nio.channels.Pipe.SinkChannelwrite


The following blocking uses the ForkJoinPool.ManagedBocker mechanism to temporarily expand the parallelism until the blocking operation completes.

APIMethods
java.io.FileAll file I/O operations
java.io.FileInputStreamopen, read, skip
java.io.FileOutputStreamopen, write
java.io.RandomAccessFileopen, read, write, seek
java.io.ConsoleAll read, format and PrintStream operations


java.net.InetAddressAll lookup operations


java.nio.MappedByteBufferforce
java.nio.channels.SelectorAll blocking selection operations
java.nio.channels.FileChannelread, write, lock, truncate, force, transferTo
java.nio.fileAll file I/O operations
Overview
Content Tools
ThemeBuilder
  • No labels

Terms of Use
• License: GPLv2
• Privacy • Trademarks • Contact Us

Powered by a free Atlassian Confluence Open Source Project License granted to https://www.atlassian.com/software/views/opensource-community-additional-license-offer. Evaluate Confluence today.

  • Kolekti ThemeBuilder Powered by Atlassian Confluence 8.5.21
  • Kolekti ThemeBuilder printed.by.atlassian.confluence
  • Report a bug
  • Atlassian News
Atlassian
Kolekti ThemeBuilder EngineAtlassian Confluence
{"serverDuration": 152, "requestCorrelationId": "21a9cd71dd374993"}