Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add doc for IOApp#pollingSystem #4222

Open
wants to merge 1 commit into
base: series/3.6.x
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions core/jvm/src/main/scala/cats/effect/IOApp.scala
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,13 @@ trait IOApp {
*/
protected def runtimeConfig: unsafe.IORuntimeConfig = unsafe.IORuntimeConfig()

/**
* The [[unsafe.PollingSystem]] used by the [[runtime]] which will evaluate the [[IO]]
* produced by `run`. It is very unlikely that users will need to override this method.
Comment on lines +169 to +170
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not to bikeshed, but wouldn't it be better to talk about how the polling system specifically handles the syscall management for the scheduler? As worded, this seems to handwave at the entire WSTP + IOFiber semantic space, which obviously polling systems don't touch.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As worded, this seems to handwave at the entire WSTP + IOFiber semantic space

LOL yes this needs improvement. It's a couple iterations of copy pasta 🤪


Not to bikeshed, but wouldn't it be better to talk about how the polling system specifically handles the syscall management for the scheduler?

What exactly do you have in mind? Really only io_uring comes close to fully taking over syscall management.

*
* [[unsafe.PollingSystem]] implementors may provide their own flavors of [[IOApp]] that
* override this method.
*/
protected def pollingSystem: unsafe.PollingSystem =
unsafe.IORuntime.createDefaultPollingSystem()

Expand Down
Loading