chore: update libuv patch for event loop integration (#31647)

* chore: update libuv patch for loop integration

* chore: update patches

Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com>
This commit is contained in:
Cheng Zhao 2022-03-29 19:03:07 +09:00 committed by GitHub
parent 6b66fea67d
commit 4e66b072da
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 509 additions and 94 deletions

View file

@ -38,22 +38,9 @@ void NodeBindingsMac::RunMessageLoop() {
handle_ = handle;
// Get notified when libuv's watcher queue changes.
uv_loop_->data = this;
uv_loop_->on_watcher_queue_updated = OnWatcherQueueChanged;
NodeBindings::RunMessageLoop();
}
// static
void NodeBindingsMac::OnWatcherQueueChanged(uv_loop_t* loop) {
NodeBindingsMac* self = static_cast<NodeBindingsMac*>(loop->data);
// We need to break the io polling in the kqueue thread when loop's watcher
// queue changes, otherwise new events cannot be notified.
self->WakeupEmbedThread();
}
void NodeBindingsMac::PollEvents() {
struct timeval tv;
int timeout = uv_backend_timeout(uv_loop_);