mirror of
https://github.com/ziglang/zig.git
synced 2026-01-30 03:03:46 +00:00
std/event/group.zig: remove promise_symbol from suspend and use @handle();
Tracking Issue #1296 ;
This commit is contained in:
parent
244a7fdafb
commit
b4ff464d39
@ -54,10 +54,11 @@ pub fn Group(comptime ReturnType: type) type {
|
||||
const S = struct {
|
||||
async fn asyncFunc(node: **Stack.Node, args2: ...) ReturnType {
|
||||
// TODO this is a hack to make the memory following be inside the coro frame
|
||||
suspend |p| {
|
||||
suspend {
|
||||
var my_node: Stack.Node = undefined;
|
||||
node.* = &my_node;
|
||||
resume p;
|
||||
var h: promise = @handle();
|
||||
resume h;
|
||||
}
|
||||
|
||||
// TODO this allocation elision should be guaranteed because we await it in
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user