| ... | @@ -585,7 +585,7 @@ pub const VTable = struct { | ... | @@ -585,7 +585,7 @@ pub const VTable = struct { |
| 585 | /// up. This mode does not support results, await, or cancel. | 585 | /// up. This mode does not support results, await, or cancel. |
| 586 | /// | 586 | /// |
| 587 | /// Thread-safe. | 587 | /// Thread-safe. |
| 588 | go: *const fn ( | 588 | asyncDetached: *const fn ( |
| 589 | /// Corresponds to `Io.userdata`. | 589 | /// Corresponds to `Io.userdata`. |
| 590 | userdata: ?*anyopaque, | 590 | userdata: ?*anyopaque, |
| 591 | /// Copied and then passed to `start`. | 591 | /// Copied and then passed to `start`. |
| ... | @@ -1162,7 +1162,7 @@ pub fn async(io: Io, function: anytype, args: std.meta.ArgsTuple(@TypeOf(functio | ... | @@ -1162,7 +1162,7 @@ pub fn async(io: Io, function: anytype, args: std.meta.ArgsTuple(@TypeOf(functio |
| 1162 | | 1162 | |
| 1163 | /// Calls `function` with `args` asynchronously. The resource cleans itself up | 1163 | /// Calls `function` with `args` asynchronously. The resource cleans itself up |
| 1164 | /// when the function returns. Does not support await, cancel, or a return value. | 1164 | /// when the function returns. Does not support await, cancel, or a return value. |
| 1165 | pub fn go(io: Io, function: anytype, args: std.meta.ArgsTuple(@TypeOf(function))) void { | 1165 | pub fn asyncDetached(io: Io, function: anytype, args: std.meta.ArgsTuple(@TypeOf(function))) void { |
| 1166 | const Args = @TypeOf(args); | 1166 | const Args = @TypeOf(args); |
| 1167 | const TypeErased = struct { | 1167 | const TypeErased = struct { |
| 1168 | fn start(context: *const anyopaque) void { | 1168 | fn start(context: *const anyopaque) void { |
| ... | @@ -1170,7 +1170,7 @@ pub fn go(io: Io, function: anytype, args: std.meta.ArgsTuple(@TypeOf(function)) | ... | @@ -1170,7 +1170,7 @@ pub fn go(io: Io, function: anytype, args: std.meta.ArgsTuple(@TypeOf(function)) |
| 1170 | @call(.auto, function, args_casted.*); | 1170 | @call(.auto, function, args_casted.*); |
| 1171 | } | 1171 | } |
| 1172 | }; | 1172 | }; |
| 1173 | io.vtable.go(io.userdata, @ptrCast((&args)[0..1]), .of(Args), TypeErased.start); | 1173 | io.vtable.asyncDetached(io.userdata, @ptrCast((&args)[0..1]), .of(Args), TypeErased.start); |
| 1174 | } | 1174 | } |
| 1175 | | 1175 | |
| 1176 | pub fn now(io: Io, clockid: std.posix.clockid_t) ClockGetTimeError!Timestamp { | 1176 | pub fn now(io: Io, clockid: std.posix.clockid_t) ClockGetTimeError!Timestamp { |