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

Tracking Issue #1296 ;
This commit is contained in:
kristopher tate 2018-07-29 17:13:16 +09:00
parent 244a7fdafb
commit b4ff464d39

View File

@ -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