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 { pub fn init() Self {
return Self{ return Self{
.lock = Lock.initLocked(), .lock = Lock.initLocked(),
.available = 0, .available = .NotStarted,
.data = undefined, .data = undefined,
}; };
} }

View File

@ -67,10 +67,10 @@ pub fn Group(comptime ReturnType: type) type {
.next = undefined, .next = undefined,
.data = Node{ .data = Node{
.handle = frame, .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); self.alloc_stack.push(node);
} }