Skip to content
Browse files

win,loop: support thread migration

  • Loading branch information...
vtjnash committed May 31, 2019
1 parent 2348256 commit 26dbe5672c33fc885462c509fe2a9b36f35866fd
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/win/core.c
@@ -114,7 +114,7 @@ int uv_loop_init(uv_loop_t* loop) {

/* Create an I/O completion port */
loop->iocp = CreateIoCompletionPort(INVALID_HANDLE_VALUE, NULL, 0, 1);
loop->iocp = CreateIoCompletionPort(INVALID_HANDLE_VALUE, NULL, 0, 0);
if (loop->iocp == NULL)
return uv_translate_sys_error(GetLastError());

1 comment on commit 26dbe56


This comment has been minimized.

Copy link

commented on 26dbe56 May 31, 2019

I don't think this is a sufficient fix, because we can have in principle more threads than CPU cores (0 just sets it to cpu cores in the system). I think fundamentally what we need is a way to release a thread's association with a completion queue when it stops running the event loop, though unfortunately, I don't see an easy way to do that in the windows API. cc @JeffBezanson

Please sign in to comment.
You can’t perform that action at this time.