From ce9daa48572a345ffd95e41d9f64b9e4719a88fa Mon Sep 17 00:00:00 2001 From: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com> Date: Thu, 22 Sep 2022 02:25:32 -0700 Subject: 1 event loop per thread. Instead of 3. uWebSockets and uSockets will need to be upgraded to match the changes. Previously: - Bun had a separate kqueue/eventfd just for async wakeups. - Bun had a separate kqueue/epoll just for reading files non-blocking in the same thread This commit unifies it into one event loop per thread --- src/bun.js/api/server.zig | 6 ------ 1 file changed, 6 deletions(-) (limited to 'src/bun.js/api/server.zig') diff --git a/src/bun.js/api/server.zig b/src/bun.js/api/server.zig index 12b383f05..2410b5e7c 100644 --- a/src/bun.js/api/server.zig +++ b/src/bun.js/api/server.zig @@ -2148,14 +2148,8 @@ pub fn NewServer(comptime ssl_enabled_: bool, comptime debug_mode_: bool) type { } this.listener = socket; - const needs_post_handler = this.vm.uws_event_loop == null; this.vm.uws_event_loop = uws.Loop.get(); this.ref(); - - if (needs_post_handler) { - _ = this.vm.uws_event_loop.?.addPostHandler(*JSC.EventLoop, this.vm.eventLoop(), JSC.EventLoop.tick); - _ = this.vm.uws_event_loop.?.addPreHandler(*JSC.EventLoop, this.vm.eventLoop(), JSC.EventLoop.tick); - } } pub fn ref(this: *ThisServer) void { -- cgit v1.2.3