Skip to content

Use CE polling system for non-blocking I/O on Native#3087

Closed
armanbilge wants to merge 36 commits into
typelevel:mainfrom
armanbilge:feature/native-polling-system
Closed

Use CE polling system for non-blocking I/O on Native#3087
armanbilge wants to merge 36 commits into
typelevel:mainfrom
armanbilge:feature/native-polling-system

Conversation

@armanbilge

Copy link
Copy Markdown
Member

This PR adopts the new polling system APIs from typelevel/cats-effect#3314 to implement non-blocking TCP/unix sockets and stdin/stdout/stderr for Scala Native. This means that epollcat is no longer required: everything now works out of the box with IOApp and the default IORuntime.

Much of the code was cribbed from epollcat and fs2-io_uring (with thanks to @LeeTibbert). Some of it can be upstreamed to ip4s or even completely removed when we upgrade to Scala Native 0.5.

This PR is tangled up with the new uncancelable semantics in CE 3.5 so it will need #3063 to merge first. It also needs a Scala Native release with scala-native/scala-native#3015 which will also unblock DatagramSocket.

@armanbilge

Copy link
Copy Markdown
Member Author

Tests are passing locally on both Linux and macOS (will need to add this to CI going forward). Published 3.5-b0f71fe-SNAPSHOT.

https://s01.oss.sonatype.org/content/repositories/snapshots/co/fs2/fs2-io_native0.4_3/3.5-b0f71fe-SNAPSHOT/

@armanbilge

Copy link
Copy Markdown
Member Author

@armanbilge

Copy link
Copy Markdown
Member Author

@armanbilge armanbilge closed this Jun 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant