diff options
| author | Tadeo Kondrak <me@tadeo.ca> | 2020-05-04 09:49:27 -0600 |
|---|---|---|
| committer | Tadeo Kondrak <me@tadeo.ca> | 2020-05-05 09:38:02 -0600 |
| commit | 6745a6f6f6f2b8d4473f00bed03a6cf1af117890 (patch) | |
| tree | 37ae8d09b48070877421d18aa79d6a49600210f1 /lib/std/event/future.zig | |
| parent | d0e996405bff4352c78c570b4944b369d642d058 (diff) | |
| download | zig-6745a6f6f6f2b8d4473f00bed03a6cf1af117890.tar.gz zig-6745a6f6f6f2b8d4473f00bed03a6cf1af117890.zip | |
zig fmt
Diffstat (limited to 'lib/std/event/future.zig')
| -rw-r--r-- | lib/std/event/future.zig | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/std/event/future.zig b/lib/std/event/future.zig index 51a63e90ee..5de22c574c 100644 --- a/lib/std/event/future.zig +++ b/lib/std/event/future.zig @@ -34,7 +34,7 @@ pub fn Future(comptime T: type) type { /// Obtain the value. If it's not available, wait until it becomes /// available. /// Thread-safe. - pub async fn get(self: *Self) *T { + pub fn get(self: *Self) callconv(.Async) *T { if (@atomicLoad(Available, &self.available, .SeqCst) == .Finished) { return &self.data; } @@ -59,7 +59,7 @@ pub fn Future(comptime T: type) type { /// should start working on the data. /// It's not required to call start() before resolve() but it can be useful since /// this method is thread-safe. - pub async fn start(self: *Self) ?*T { + pub fn start(self: *Self) callconv(.Async) ?*T { const state = @cmpxchgStrong(Available, &self.available, .NotStarted, .Started, .SeqCst, .SeqCst) orelse return null; switch (state) { .Started => { |
