Commit b4ff464d39

kristopher tate <kt@connectfree.co.jp>
2018-07-29 10:13:16
std/event/group.zig: remove promise_symbol from suspend and use @handle();
Tracking Issue #1296 ;
1 parent 244a7fd
Changed files (1)
std
event
std/event/group.zig
@@ -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