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 {...@@ -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 frame56 // 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 }
6263
63 // TODO this allocation elision should be guaranteed because we await it in64 // TODO this allocation elision should be guaranteed because we await it in