| ... | @@ -54,10 +54,11 @@ pub fn Group(comptime ReturnType: type) type { | ... | @@ -54,10 +54,11 @@ pub fn Group(comptime ReturnType: type) type { |
| 54 | const S = struct { | 54 | const S = struct { |
| 55 | async fn asyncFunc(node: **Stack.Node, args2: ...) ReturnType { | 55 | async fn asyncFunc(node: **Stack.Node, args2: ...) ReturnType { |
| 56 | // TODO this is a hack to make the memory following be inside the coro frame | 56 | // TODO this is a hack to make the memory following be inside the coro frame |
| 57 | suspend |p| { | 57 | suspend { |
| 58 | var my_node: Stack.Node = undefined; | 58 | var my_node: Stack.Node = undefined; |
| 59 | node.* = &my_node; | 59 | node.* = &my_node; |
| 60 | resume p; | 60 | var h: promise = @handle(); |
| | 61 | resume h; |
| 61 | } | 62 | } |
| 62 | | 63 | |
| 63 | // TODO this allocation elision should be guaranteed because we await it in | 64 | // TODO this allocation elision should be guaranteed because we await it in |