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

    Loading...
  1. Dashboard
  2. Loom
  3. Main
  4. This page on blocking operations can be removed.

Page History

Versions Compared

Old Version 15

changes.mady.by.user Alan Bateman

Saved on May 03, 2019

compared with

New Version 16

changes.mady.by.user Alan Bateman

Saved on May 08, 2019

  • Previous Change: Difference between versions 14 and 15
  • Next Change: Difference between versions 16 and 17
  • View Page History

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

APIMethodsNotes
java.net.Socketconnect, read, writeRelies on JEP 353
java.net.ServerSocketaccept



java.nio.channels.SocketChannelconnect, read, write, closeconnect, read, and write , and close on the socket adaptor obtained via SocketChannel::socket also okay
java.nio.channels.ServerSocketChannelaccept, closeaccept and close on the socket adpator adaptor obtained via ServerSocketChannel::socket also okay
java.nio.channels.DatagramChannelread, receive, closewrite and send do not block
java.nio.channels.Pipe.SourceChannelread, close
java.nio.channels.Pipe.SinkChannelwrite, close


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

APIMethodsNotes
java.net.DatagramSocketreceiveNeed to investigate if receive can be done without synchronizing on the DatagramPacket (unspecified but long standing behavior)
java.net.InetAddress

getByName, getAllByName, ..

These methods block in NSS/equivalent. Several operations to explore including using a thread pool or dusting off the JNDI DNS provider.
java.nio.channels.SelectorselectSelection 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.java.lang.ThreadinterruptIf a thread is interrupted when blocked in an I/O operation on an InterruptibleChannel then the channel is closed. The locking to support this is not yet fiber friendly so Thread.interrupt may pin the carrier thread while waiting for the blocking operations on the channel to abort. This should resolved itself once close is changed to non-blocking.
Overview
Content Tools
ThemeBuilder

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.23
  • Kolekti ThemeBuilder printed.by.atlassian.confluence
  • Report a bug
  • Atlassian News
Atlassian
Kolekti ThemeBuilder EngineAtlassian Confluence
{"serverDuration": 261, "requestCorrelationId": "833ebea4931543a1"}