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

Message loop integration on Windows #41

Closed
zcbenz opened this issue Jul 22, 2013 · 1 comment
Closed

Message loop integration on Windows #41

zcbenz opened this issue Jul 22, 2013 · 1 comment

Comments

@zcbenz
Copy link
Member

zcbenz commented Jul 22, 2013

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.

@zcbenz zcbenz closed this as completed in 85e4e99 Jul 23, 2013
@zcbenz
Copy link
Member Author

zcbenz commented Jul 23, 2013

On Windows, the handle of an IO completion port can not be polled by another IO completion port or functions like WaitForSingleObject (this is different from Unix, for example, we can use one kqueue to poll another kqueue), so we have to use GetQueuedCompletionStatus to poll, and then use GetQueuedCompletionStatus to restore since GetQueuedCompletionStatus would dequeue the incoming event.

kevinsawicki pushed a commit that referenced this issue May 9, 2017
Use "ProxyResolverV8" instead of "SystemProxyResolver" as proxy service
kevinsawicki pushed a commit that referenced this issue May 9, 2017
kevinsawicki pushed a commit that referenced this issue May 9, 2017
Use "ProxyResolverV8" instead of "SystemProxyResolver" as proxy service
kevinsawicki pushed a commit that referenced this issue May 9, 2017
kevinsawicki pushed a commit that referenced this issue Jul 6, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant