authorgravatar for kt@connectfree.co.jpkristopher tate <kt@connectfree.co.jp> 2018-07-29 17:13:16+09:00
committergravatar for kt@connectfree.co.jpkristopher tate <kt@connectfree.co.jp> 2018-08-02 16:59:11+09:00
logb4ff464d39038fe840ed6fce3f73cd075fde25f2
tree91b490fbe9dc54442f28d0c60c2d25fc6d165c4a
parent244a7fdafb97b215e0e9e3e8aaa23777eccebd14

std/event/group.zig: remove promise_symbol from suspend and use @handle();

Tracking Issue #1296 ;

1 files changed, 3 insertions(+), 2 deletions(-)

std/event/group.zig+3-2
......@@ -54,10 +54,11 @@ pub fn Group(comptime ReturnType: type) type {
5454 const S = struct {
5555 async fn asyncFunc(node: **Stack.Node, args2: ...) ReturnType {
5656 // TODO this is a hack to make the memory following be inside the coro frame
57 suspend |p| {
57 suspend {
5858 var my_node: Stack.Node = undefined;
5959 node.* = &my_node;
60 resume p;
60 var h: promise = @handle();
61 resume h;
6162 }
6263
6364 // TODO this allocation elision should be guaranteed because we await it in