diff options
| author | Tadeo Kondrak <me@tadeo.ca> | 2020-05-05 05:14:22 -0600 |
|---|---|---|
| committer | Tadeo Kondrak <me@tadeo.ca> | 2020-05-05 05:55:25 -0600 |
| commit | af00afed9844b9fb17478d33840fb4a312c4f07c (patch) | |
| tree | 2199ced7be5a0234a18bdb57cac9309cd2f16cc0 /lib/std/event | |
| parent | b957dc29a4e3f025e446e717b0ae8c69602545ca (diff) | |
| download | zig-af00afed9844b9fb17478d33840fb4a312c4f07c.tar.gz zig-af00afed9844b9fb17478d33840fb4a312c4f07c.zip | |
zig fmt
Diffstat (limited to 'lib/std/event')
| -rw-r--r-- | lib/std/event/batch.zig | 4 | ||||
| -rw-r--r-- | lib/std/event/loop.zig | 8 |
2 files changed, 6 insertions, 6 deletions
diff --git a/lib/std/event/batch.zig b/lib/std/event/batch.zig index af59b32490..26c0d5fab0 100644 --- a/lib/std/event/batch.zig +++ b/lib/std/event/batch.zig @@ -75,7 +75,7 @@ pub fn Batch( const job = &self.jobs[self.next_job_index]; self.next_job_index = (self.next_job_index + 1) % max_jobs; if (job.frame) |existing| { - job.result = if (async_ok) await existing else noasync await existing; + job.result = if (async_ok) await existing else nosuspend await existing; if (CollectedResult != void) { job.result catch |err| { self.collected_result = err; @@ -94,7 +94,7 @@ pub fn Batch( /// a time, however, it need not be the same thread. pub fn wait(self: *Self) CollectedResult { for (self.jobs) |*job| if (job.frame) |f| { - job.result = if (async_ok) await f else noasync await f; + job.result = if (async_ok) await f else nosuspend await f; if (CollectedResult != void) { job.result catch |err| { self.collected_result = err; diff --git a/lib/std/event/loop.zig b/lib/std/event/loop.zig index 6fa65f90dd..15e7a3481c 100644 --- a/lib/std/event/loop.zig +++ b/lib/std/event/loop.zig @@ -195,7 +195,7 @@ pub const Loop = struct { const wakeup_bytes = [_]u8{0x1} ** 8; fn initOsData(self: *Loop, extra_thread_count: usize) InitOsDataError!void { - noasync switch (builtin.os.tag) { + nosuspend switch (builtin.os.tag) { .linux => { errdefer { while (self.available_eventfd_resume_nodes.pop()) |node| os.close(node.data.eventfd); @@ -371,7 +371,7 @@ pub const Loop = struct { } fn deinitOsData(self: *Loop) void { - noasync switch (builtin.os.tag) { + nosuspend switch (builtin.os.tag) { .linux => { os.close(self.os_data.final_eventfd); while (self.available_eventfd_resume_nodes.pop()) |node| os.close(node.data.eventfd); @@ -663,7 +663,7 @@ pub const Loop = struct { } pub fn finishOneEvent(self: *Loop) void { - noasync { + nosuspend { const prev = @atomicRmw(usize, &self.pending_event_count, .Sub, 1, .SeqCst); if (prev != 1) return; @@ -1041,7 +1041,7 @@ pub const Loop = struct { } fn posixFsRun(self: *Loop) void { - noasync while (true) { + nosuspend while (true) { self.fs_thread_wakeup.reset(); while (self.fs_queue.get()) |node| { switch (node.data.msg) { |
