Reduce memory usage in long-running processes (#14885)

This commit is contained in:
Jarred Sumner
2024-10-29 12:56:10 -07:00
committed by GitHub
parent d5f9978007
commit b5a73130ad
16 changed files with 120 additions and 60 deletions

View File

@@ -55,11 +55,11 @@ pub const KeepAlive = struct {
this.status = .inactive;
if (comptime @TypeOf(event_loop_ctx_) == JSC.EventLoopHandle) {
event_loop_ctx_.loop().subActive(1);
event_loop_ctx_.loop().unref();
return;
}
const event_loop_ctx = JSC.AbstractVM(event_loop_ctx_);
event_loop_ctx.platformEventLoop().subActive(1);
event_loop_ctx.platformEventLoop().unref();
}
/// From another thread, Prevent a poll from keeping the process alive.