aboutsummaryrefslogtreecommitdiff
path: root/lib/std/event/batch.zig
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2020-05-05 11:21:02 -0400
committerGitHub <noreply@github.com>2020-05-05 11:21:02 -0400
commite6955688ac2255d3813e8d2994b6661bc651369b (patch)
tree9879154a5e02b77e95c1cf04a7cde64cb7adc727 /lib/std/event/batch.zig
parentfde6d28c237fbeae2ace8f2834190c6f9752712a (diff)
parentfdfdac493998a180eeffdcab66e579e7af250039 (diff)
downloadzig-e6955688ac2255d3813e8d2994b6661bc651369b.tar.gz
zig-e6955688ac2255d3813e8d2994b6661bc651369b.zip
Merge pull request #5272 from tadeokondrak/noasync-to-nosuspend
Noasync to nosuspend
Diffstat (limited to 'lib/std/event/batch.zig')
-rw-r--r--lib/std/event/batch.zig6
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;