fix small regressions in std.event

master
Vexu 2019-11-23 20:18:38 +02:00 committed by Andrew Kelley
parent ad0871ea4b
commit 7fa59565d3
2 changed files with 3 additions and 3 deletions

View File

@ -26,7 +26,7 @@ pub fn Future(comptime T: type) type {
pub fn init() Self {
return Self{
.lock = Lock.initLocked(),
.available = 0,
.available = .NotStarted,
.data = undefined,
};
}

View File

@ -67,10 +67,10 @@ pub fn Group(comptime ReturnType: type) type {
.next = undefined,
.data = Node{
.handle = frame,
.bytes = @sliceToBytes((*[1]@Frame(func))(frame)[0..]),
.bytes = std.mem.asBytes(frame),
},
};
frame.* = async func(args);
_ = @asyncCall(frame, {}, func, args);
self.alloc_stack.push(node);
}