diff options
| author | Andrew Kelley <superjoe30@gmail.com> | 2018-08-02 17:36:08 -0400 |
|---|---|---|
| committer | Andrew Kelley <superjoe30@gmail.com> | 2018-08-02 17:36:08 -0400 |
| commit | 7f6e97cb26ffabbc192e7ccdf44aebbbc3be751d (patch) | |
| tree | 46e7ff095b47e4d755a9a386b1dc6daf946bde3a /std/event/rwlock.zig | |
| parent | 65140b2fba4e55d713de506f2bed259ca9410cbf (diff) | |
| download | zig-7f6e97cb26ffabbc192e7ccdf44aebbbc3be751d.tar.gz zig-7f6e97cb26ffabbc192e7ccdf44aebbbc3be751d.zip | |
fixups from the merge
Diffstat (limited to 'std/event/rwlock.zig')
| -rw-r--r-- | std/event/rwlock.zig | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/std/event/rwlock.zig b/std/event/rwlock.zig index cbcdff06af..0e2407bf31 100644 --- a/std/event/rwlock.zig +++ b/std/event/rwlock.zig @@ -97,10 +97,10 @@ pub const RwLock = struct { pub async fn acquireRead(self: *RwLock) HeldRead { _ = @atomicRmw(usize, &self.reader_lock_count, AtomicRmwOp.Add, 1, AtomicOrder.SeqCst); - suspend |handle| { + suspend { // TODO explicitly put this memory in the coroutine frame #1194 var my_tick_node = Loop.NextTickNode{ - .data = handle, + .data = @handle(), .prev = undefined, .next = undefined, }; @@ -130,10 +130,10 @@ pub const RwLock = struct { } pub async fn acquireWrite(self: *RwLock) HeldWrite { - suspend |handle| { + suspend { // TODO explicitly put this memory in the coroutine frame #1194 var my_tick_node = Loop.NextTickNode{ - .data = handle, + .data = @handle(), .prev = undefined, .next = undefined, }; @@ -231,8 +231,8 @@ test "std.event.RwLock" { async fn testLock(loop: *Loop, lock: *RwLock) void { // TODO explicitly put next tick node memory in the coroutine frame #1194 - suspend |p| { - resume p; + suspend { + resume @handle(); } var read_nodes: [100]Loop.NextTickNode = undefined; |
