| author | |
| committer | |
| log | 96dc44b5eadd5104783c6cc8f60032e4221ca20a |
| tree | 2dfbbec931db0a6b3570d154a9f6fa24ed5745b8 |
| parent | 79b807bf1c328af7bd7d27ef27dfd3938113ea40 |
3 files changed, 11 insertions(+), 11 deletions(-)
lib/std/Io.zig+5-5| ... | ... | @@ -583,7 +583,7 @@ pub const VTable = struct { |
| 583 | 583 | start: *const fn (context: *const anyopaque, result: *anyopaque) void, |
| 584 | 584 | ) ?*AnyFuture, |
| 585 | 585 | /// Thread-safe. |
| 586 | asyncConcurrent: *const fn ( | |
| 586 | concurrent: *const fn ( | |
| 587 | 587 | /// Corresponds to `Io.userdata`. |
| 588 | 588 | userdata: ?*anyopaque, |
| 589 | 589 | result_len: usize, |
| ... | ... | @@ -1095,7 +1095,7 @@ pub fn Queue(Elem: type) type { |
| 1095 | 1095 | /// not guaranteed to be available until `await` is called. |
| 1096 | 1096 | /// |
| 1097 | 1097 | /// `function` *may* be called immediately, before `async` returns. This has |
| 1098 | /// weaker guarantees than `asyncConcurrent`, making more portable and | |
| 1098 | /// weaker guarantees than `concurrent`, making more portable and | |
| 1099 | 1099 | /// reusable. |
| 1100 | 1100 | /// |
| 1101 | 1101 | /// See also: |
| ... | ... | @@ -1133,7 +1133,7 @@ pub fn async( |
| 1133 | 1133 | /// This has stronger guarantee than `async`, placing restrictions on what kind |
| 1134 | 1134 | /// of `Io` implementations are supported. By calling `async` instead, one |
| 1135 | 1135 | /// allows, for example, stackful single-threaded blocking I/O. |
| 1136 | pub fn asyncConcurrent( | |
| 1136 | pub fn concurrent( | |
| 1137 | 1137 | io: Io, |
| 1138 | 1138 | function: anytype, |
| 1139 | 1139 | args: std.meta.ArgsTuple(@TypeOf(function)), |
| ... | ... | @@ -1148,7 +1148,7 @@ pub fn asyncConcurrent( |
| 1148 | 1148 | } |
| 1149 | 1149 | }; |
| 1150 | 1150 | var future: Future(Result) = undefined; |
| 1151 | future.any_future = try io.vtable.asyncConcurrent( | |
| 1151 | future.any_future = try io.vtable.concurrent( | |
| 1152 | 1152 | io.userdata, |
| 1153 | 1153 | @sizeOf(Result), |
| 1154 | 1154 | .of(Result), |
| ... | ... | @@ -1166,7 +1166,7 @@ pub fn asyncConcurrent( |
| 1166 | 1166 | /// |
| 1167 | 1167 | /// See also: |
| 1168 | 1168 | /// * `async` |
| 1169 | /// * `asyncConcurrent` | |
| 1169 | /// * `concurrent` | |
| 1170 | 1170 | pub fn asyncDetached(io: Io, function: anytype, args: std.meta.ArgsTuple(@TypeOf(function))) void { |
| 1171 | 1171 | const Args = @TypeOf(args); |
| 1172 | 1172 | const TypeErased = struct { |
lib/std/Io/EventLoop.zig+3-3| ... | ... | @@ -139,7 +139,7 @@ pub fn io(el: *EventLoop) Io { |
| 139 | 139 | .userdata = el, |
| 140 | 140 | .vtable = &.{ |
| 141 | 141 | .async = async, |
| 142 | .asyncConcurrent = asyncConcurrent, | |
| 142 | .concurrent = concurrent, | |
| 143 | 143 | .await = await, |
| 144 | 144 | .asyncDetached = asyncDetached, |
| 145 | 145 | .select = select, |
| ... | ... | @@ -878,13 +878,13 @@ fn async( |
| 878 | 878 | context_alignment: Alignment, |
| 879 | 879 | start: *const fn (context: *const anyopaque, result: *anyopaque) void, |
| 880 | 880 | ) ?*std.Io.AnyFuture { |
| 881 | return asyncConcurrent(userdata, result.len, result_alignment, context, context_alignment, start) catch { | |
| 881 | return concurrent(userdata, result.len, result_alignment, context, context_alignment, start) catch { | |
| 882 | 882 | start(context.ptr, result.ptr); |
| 883 | 883 | return null; |
| 884 | 884 | }; |
| 885 | 885 | } |
| 886 | 886 | |
| 887 | fn asyncConcurrent( | |
| 887 | fn concurrent( | |
| 888 | 888 | userdata: ?*anyopaque, |
| 889 | 889 | result_len: usize, |
| 890 | 890 | result_alignment: Alignment, |
lib/std/Io/Threaded.zig+3-3| ... | ... | @@ -99,7 +99,7 @@ pub fn io(pool: *Pool) Io { |
| 99 | 99 | .userdata = pool, |
| 100 | 100 | .vtable = &.{ |
| 101 | 101 | .async = async, |
| 102 | .asyncConcurrent = asyncConcurrent, | |
| 102 | .concurrent = concurrent, | |
| 103 | 103 | .await = await, |
| 104 | 104 | .asyncDetached = asyncDetached, |
| 105 | 105 | .cancel = cancel, |
| ... | ... | @@ -261,7 +261,7 @@ fn async( |
| 261 | 261 | } |
| 262 | 262 | const pool: *Pool = @ptrCast(@alignCast(userdata)); |
| 263 | 263 | const cpu_count = pool.cpu_count catch { |
| 264 | return asyncConcurrent(userdata, result.len, result_alignment, context, context_alignment, start) catch { | |
| 264 | return concurrent(userdata, result.len, result_alignment, context, context_alignment, start) catch { | |
| 265 | 265 | start(context.ptr, result.ptr); |
| 266 | 266 | return null; |
| 267 | 267 | }; |
| ... | ... | @@ -325,7 +325,7 @@ fn async( |
| 325 | 325 | return @ptrCast(closure); |
| 326 | 326 | } |
| 327 | 327 | |
| 328 | fn asyncConcurrent( | |
| 328 | fn concurrent( | |
| 329 | 329 | userdata: ?*anyopaque, |
| 330 | 330 | result_len: usize, |
| 331 | 331 | result_alignment: std.mem.Alignment, |