chore: remove redundant code in node integration (#33500)
This commit is contained in:
parent
df3cfb663c
commit
c119b1ebef
11 changed files with 32 additions and 108 deletions
|
@ -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.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue