Commit 7fa59565d3

Vexu <15308111+Vexu@users.noreply.github.com>
2019-11-23 19:18:38
fix small regressions in std.event
1 parent ad0871e
Changed files (2)
lib
lib/std/event/future.zig
@@ -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,
             };
         }
lib/std/event/group.zig
@@ -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);
         }