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 @@ -797,9 +797,10 @@ fn await(
797797 result_alignment : std.mem.Alignment ,
798798) void {
799799 _ = result_alignment ;
800+ if (builtin .single_threaded ) return ;
800801 const t : * Threaded = @ptrCast (@alignCast (userdata ));
801- const closure : * AsyncClosure = @ptrCast (@alignCast (any_future ));
802- closure .waitAndDeinit (t .allocator , result );
802+ const ac : * AsyncClosure = @ptrCast (@alignCast (any_future ));
803+ ac .waitAndDeinit (t .allocator , result );
803804}
804805
805806fn cancel (
@@ -809,6 +810,7 @@ fn cancel(
809810 result_alignment : std.mem.Alignment ,
810811) void {
811812 _ = result_alignment ;
813+ if (builtin .single_threaded ) return ;
812814 const t : * Threaded = @ptrCast (@alignCast (userdata ));
813815 const ac : * AsyncClosure = @ptrCast (@alignCast (any_future ));
814816 ac .closure .requestCancel ();
You can’t perform that action at this time.
0 commit comments