-
Notifications
You must be signed in to change notification settings - Fork 8
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
multi-socket support #124
base: main
Are you sure you want to change the base?
multi-socket support #124
Conversation
c73a986
to
5519733
Compare
This implementation uses curl multi socket drive, and uses FileDescriptorPoller from cats effect. It allows using this library alongside other cats effect libraries.
5519733
to
829ba96
Compare
curl/src/main/scala/org/http4s/curl/unsafe/CurlMultiPerformPoller.scala
Outdated
Show resolved
Hide resolved
|
||
override def needsPoll(poller: Poller): Boolean = needsPoll | ||
|
||
override def interrupt(targetThread: Thread, targetPoller: Poller): Unit = () |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is fine for now because everything is single-threaded, but to support multi-threading in the future we will have to figure out a way to interrupt curl_multi_poll
somehow 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, that was my concern as well. I hope we can use the proper event-driven approach for Windows by then, so we deprecate this polling stuff completely 😄
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
but to support multi-threading in the future we will have to figure out a way to interrupt
curl_multi_poll
somehow
Aha :)
Apparently there is some race condition in this implementation, as multi socket runtime tests don't terminate sometimes. Sometimes even the test timeout does not work, that might give a clue for next investigations. |
closes #117