chore: remove redundant code in node integration (#33500)

This commit is contained in:
Cheng Zhao 2022-03-30 12:09:42 +09:00 committed by GitHub
parent df3cfb663c
commit c119b1ebef
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 32 additions and 108 deletions

View file

@ -27,31 +27,6 @@ NodeBindingsWin::NodeBindingsWin(BrowserEnvironment browser_env)
}
}
NodeBindingsWin::~NodeBindingsWin() = default;
void NodeBindingsWin::PrepareMessageLoop() {
// IOCP does not change for the process until the loop is recreated,
// we ensure that there is only a single polling thread satisfying
// the concurrency limit set from CreateIoCompletionPort call by
// uv_loop_init for the lifetime of this process.
if (initialized_)
return;
NodeBindings::PrepareMessageLoop();
}
void NodeBindingsWin::RunMessageLoop() {
// Avoid calling UvRunOnce if the loop is already active,
// otherwise it can lead to situations were the number of active
// threads processing on IOCP is greater than the concurrency limit.
if (initialized_)
return;
initialized_ = true;
NodeBindings::RunMessageLoop();
}
void NodeBindingsWin::PollEvents() {
// If there are other kinds of events pending, uv_backend_timeout will
// instruct us not to wait.