diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2020-05-16 01:26:18 -0400 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2020-05-16 01:26:18 -0400 |
| commit | 69a5f0d7973f2a3fefb69bc30c7dc1f0b430bba2 (patch) | |
| tree | e3e8fad5e67b66f5b51b53c421187221d1cab1e5 /lib/std/event/batch.zig | |
| parent | a286b5de38617809db58f918a81a650b41fbdd49 (diff) | |
| parent | f8b99331a2ca98f0e938c8caaf1cd232ad1e9fa3 (diff) | |
| download | zig-69a5f0d7973f2a3fefb69bc30c7dc1f0b430bba2.tar.gz zig-69a5f0d7973f2a3fefb69bc30c7dc1f0b430bba2.zip | |
Merge remote-tracking branch 'origin/master' into self-hosted-incremental-compilation
Diffstat (limited to 'lib/std/event/batch.zig')
| -rw-r--r-- | lib/std/event/batch.zig | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/std/event/batch.zig b/lib/std/event/batch.zig index af59b32490..9c424fcd2c 100644 --- a/lib/std/event/batch.zig +++ b/lib/std/event/batch.zig @@ -21,7 +21,7 @@ pub fn Batch( /// usual recommended option for this parameter. auto_async, - /// Always uses the `noasync` keyword when using `await` on the jobs, + /// Always uses the `nosuspend` keyword when using `await` on the jobs, /// making `add` and `wait` non-async functions. Asserts that the jobs do not suspend. never_async, @@ -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; |
