aboutsummaryrefslogtreecommitdiff
path: root/src/bun.js/api
diff options
context:
space:
mode:
authorGravatar Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com> 2023-08-29 15:31:06 -0700
committerGravatar Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com> 2023-08-29 15:31:06 -0700
commit5d84ef778066a6221630d82b7dc6b01aeddc3c26 (patch)
tree228e1ebae88207679fb60e08afce7b7656609758 /src/bun.js/api
parenta77ed151afd9ae946b500c3bac6cf1fdb18550ad (diff)
downloadbun-5d84ef778066a6221630d82b7dc6b01aeddc3c26.tar.gz
bun-5d84ef778066a6221630d82b7dc6b01aeddc3c26.tar.zst
bun-5d84ef778066a6221630d82b7dc6b01aeddc3c26.zip
Rename `uws_event_loop` to `event_loop_handle`
Diffstat (limited to 'src/bun.js/api')
-rw-r--r--src/bun.js/api/bun.zig10
-rw-r--r--src/bun.js/api/bun/dns_resolver.zig6
-rw-r--r--src/bun.js/api/bun/subprocess.zig6
-rw-r--r--src/bun.js/api/server.zig2
4 files changed, 12 insertions, 12 deletions
diff --git a/src/bun.js/api/bun.zig b/src/bun.js/api/bun.zig
index cf984c81a..f86031caf 100644
--- a/src/bun.js/api/bun.zig
+++ b/src/bun.js/api/bun.zig
@@ -3325,7 +3325,7 @@ pub const Timer = struct {
if (val.did_unref_timer) {
val.did_unref_timer = false;
- vm.uws_event_loop.?.num_polls += 1;
+ vm.event_loop_handle.?.num_polls += 1;
}
}
}
@@ -3398,7 +3398,7 @@ pub const Timer = struct {
.callback = JSC.Strong.create(callback, globalThis),
.globalThis = globalThis,
.timer = uws.Timer.create(
- vm.uws_event_loop.?,
+ vm.event_loop_handle.?,
id,
),
};
@@ -3444,7 +3444,7 @@ pub const Timer = struct {
if (!val.did_unref_timer) {
val.did_unref_timer = true;
- vm.uws_event_loop.?.num_polls -= 1;
+ vm.event_loop_handle.?.num_polls -= 1;
}
}
}
@@ -3597,7 +3597,7 @@ pub const Timer = struct {
this.timer.deinit();
// balance double unreffing in doUnref
- vm.uws_event_loop.?.num_polls += @as(i32, @intFromBool(this.did_unref_timer));
+ vm.event_loop_handle.?.num_polls += @as(i32, @intFromBool(this.did_unref_timer));
this.callback.deinit();
this.arguments.deinit();
@@ -3653,7 +3653,7 @@ pub const Timer = struct {
.callback = JSC.Strong.create(callback, globalThis),
.globalThis = globalThis,
.timer = uws.Timer.create(
- vm.uws_event_loop.?,
+ vm.event_loop_handle.?,
Timeout.ID{
.id = id,
.kind = kind,
diff --git a/src/bun.js/api/bun/dns_resolver.zig b/src/bun.js/api/bun/dns_resolver.zig
index 9c0bc8543..7364c2ffa 100644
--- a/src/bun.js/api/bun/dns_resolver.zig
+++ b/src/bun.js/api/bun/dns_resolver.zig
@@ -122,7 +122,7 @@ const LibInfo = struct {
request.backend.libinfo.file_poll = bun.JSC.FilePoll.init(this.vm, std.math.maxInt(i32) - 1, .{}, GetAddrInfoRequest, request);
std.debug.assert(
request.backend.libinfo.file_poll.?.registerWithFd(
- this.vm.uws_event_loop.?,
+ this.vm.event_loop_handle.?,
.machport,
true,
@intFromPtr(request.backend.libinfo.machport),
@@ -1656,10 +1656,10 @@ pub const DNSResolver = struct {
var poll = poll_entry.value_ptr.*.?;
if (readable and !poll.flags.contains(.poll_readable))
- _ = poll.register(vm.uws_event_loop.?, .readable, false);
+ _ = poll.register(vm.event_loop_handle.?, .readable, false);
if (writable and !poll.flags.contains(.poll_writable))
- _ = poll.register(vm.uws_event_loop.?, .writable, false);
+ _ = poll.register(vm.event_loop_handle.?, .writable, false);
}
const DNSQuery = struct {
diff --git a/src/bun.js/api/bun/subprocess.zig b/src/bun.js/api/bun/subprocess.zig
index 77cf3886e..2ee94a222 100644
--- a/src/bun.js/api/bun/subprocess.zig
+++ b/src/bun.js/api/bun/subprocess.zig
@@ -1404,7 +1404,7 @@ pub const Subprocess = struct {
var poll = JSC.FilePoll.init(jsc_vm, watchfd, .{}, Subprocess, subprocess);
subprocess.poll_ref = poll;
switch (subprocess.poll_ref.?.register(
- jsc_vm.uws_event_loop.?,
+ jsc_vm.event_loop_handle.?,
.process,
true,
)) {
@@ -1467,7 +1467,7 @@ pub const Subprocess = struct {
var poll = JSC.FilePoll.init(jsc_vm, watchfd, .{}, Subprocess, subprocess);
subprocess.poll_ref = poll;
switch (subprocess.poll_ref.?.register(
- jsc_vm.uws_event_loop.?,
+ jsc_vm.event_loop_handle.?,
.process,
true,
)) {
@@ -1530,7 +1530,7 @@ pub const Subprocess = struct {
pub fn watch(this: *Subprocess) void {
if (this.poll_ref) |poll| {
_ = poll.register(
- this.globalThis.bunVM().uws_event_loop.?,
+ this.globalThis.bunVM().event_loop_handle.?,
.process,
true,
);
diff --git a/src/bun.js/api/server.zig b/src/bun.js/api/server.zig
index ffe24f0f6..acb0b1a10 100644
--- a/src/bun.js/api/server.zig
+++ b/src/bun.js/api/server.zig
@@ -5399,7 +5399,7 @@ pub fn NewServer(comptime NamespaceType: type, comptime ssl_enabled_: bool, comp
}
this.listener = socket;
- this.vm.uws_event_loop = uws.Loop.get();
+ this.vm.event_loop_handle = uws.Loop.get();
}
pub fn ref(this: *ThisServer) void {