File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -774,9 +774,10 @@ fn await(
774774 result_alignment : std.mem.Alignment ,
775775) void {
776776 _ = result_alignment ;
777+ if (builtin .single_threaded ) return ;
777778 const t : * Threaded = @ptrCast (@alignCast (userdata ));
778- const closure : * AsyncClosure = @ptrCast (@alignCast (any_future ));
779- closure .waitAndFree (t .allocator , result );
779+ const ac : * AsyncClosure = @ptrCast (@alignCast (any_future ));
780+ ac .waitAndFree (t .allocator , result );
780781}
781782
782783fn cancel (
@@ -786,6 +787,7 @@ fn cancel(
786787 result_alignment : std.mem.Alignment ,
787788) void {
788789 _ = result_alignment ;
790+ if (builtin .single_threaded ) return ;
789791 const t : * Threaded = @ptrCast (@alignCast (userdata ));
790792 const ac : * AsyncClosure = @ptrCast (@alignCast (any_future ));
791793 ac .closure .requestCancel ();
You can’t perform that action at this time.
0 commit comments