-
Notifications
You must be signed in to change notification settings - Fork 16.8k
Description
This issue is mainly used to track my progress of message loop integration on Windows
In node-webkit, to make libuv loop work in renderer on Windows and Linux, we just patched Chromium to replace its message loop with libuv. But in atom-shell, since we need to implement message loop integration on both browser and renderer, and there is obviously no way to replace browser's UI message loop with libuv, we have to use the same way with the implementation on Mac: poll libuv events in new thread and deal with them in the main thread.
On Windows, since libuv implements its message loop with IOCP, we need to use GetQueuedCompletionStatus to poll in the new thread. Ideally it can be done by creating a new IO completion port to monitor libuv's IO completion port. Or using GetQueuedCompletionStatus to dequeue libuv's IO completion port, and then posting the event back with PostQueuedCompletionStatus.
But strangely both ways do not work well, I'm still looking into it.