-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
win,libuv: support multiple threads #32211
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
Conversation
turns off the "do not work" flag fix #32087
@@ -1,2 +1,2 @@ | |||
LIBUV_BRANCH=julia-uv2-1.24.0 | |||
LIBUV_SHA1=2348256acf5759a544e5ca7935f638d2bc091d60 | |||
LIBUV_SHA1=26dbe5672c33fc885462c509fe2a9b36f35866fd |
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.
As I commented on the relevant commit somewhere. I don't think this fix is sufficient in the presence of more threads than the number of cores in the machine. The problem is that threads retain their completion port association, but we migrate the completion port to a different thread. Ideally we'd have a way to drop that association and keep this value as is. |
That makes sense, but in the meantime this is a much-needed improvement. It makes the difference between simple threaded code locking up every time vs. generally working. |
That's something to consider in the future, although hopefully less of a concern, since any blocking call to the kernel should enable releasing a new thread from the IOCP. If we do continue with the current IO design unchanged, there is a way that this should be addressable per the MSDN documentation:
|
Can we just set that value to something like typemax? Are there any resources allocated proportional to that value? If not, setting it really high is probably a solution, since we can't allocate that many threads anyway. |
turns off the "do not work" flag
fix #32087