authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2018-09-02 11:14:17-04:00
committergravatar for noreply@github.comGitHub <noreply@github.com> 2018-09-02 11:14:17-04:00
log67cb299f7d7cd88e6843f12865477594843f1496
treecb6bf3f66dd3557b658f9491242cd156a02bb8d5
parent1a5c3e4501589d50920489caed01ac344bc6f72a
parent528e3b43a677c0fbd05245fec9e4a6c361b89b59
signaturebadge-question-mark Signed by PGP key 4AEE18F83AFDEB23

Merge pull request #1456 from shawnl/inaccurate-comments

these all use futex() (inaccurate comments)

4 files changed, 4 insertions(+), 4 deletions(-)

std/event/lock.zig+1-1
...@@ -7,7 +7,7 @@ const AtomicOrder = builtin.AtomicOrder;...@@ -7,7 +7,7 @@ const AtomicOrder = builtin.AtomicOrder;
7const Loop = std.event.Loop;7const Loop = std.event.Loop;
88
9/// Thread-safe async/await lock.9/// Thread-safe async/await lock.
10/// Does not make any syscalls - coroutines which are waiting for the lock are suspended, and10/// coroutines which are waiting for the lock are suspended, and
11/// are resumed when the lock is released, in order.11/// are resumed when the lock is released, in order.
12/// Allows only one actor to hold the lock.12/// Allows only one actor to hold the lock.
13pub const Lock = struct {13pub const Lock = struct {
std/event/locked.zig+1-1
...@@ -3,7 +3,7 @@ const Lock = std.event.Lock;...@@ -3,7 +3,7 @@ const Lock = std.event.Lock;
3const Loop = std.event.Loop;3const Loop = std.event.Loop;
44
5/// Thread-safe async/await lock that protects one piece of data.5/// Thread-safe async/await lock that protects one piece of data.
6/// Does not make any syscalls - coroutines which are waiting for the lock are suspended, and6/// coroutines which are waiting for the lock are suspended, and
7/// are resumed when the lock is released, in order.7/// are resumed when the lock is released, in order.
8pub fn Locked(comptime T: type) type {8pub fn Locked(comptime T: type) type {
9 return struct {9 return struct {
std/event/rwlock.zig+1-1
...@@ -7,7 +7,7 @@ const AtomicOrder = builtin.AtomicOrder;...@@ -7,7 +7,7 @@ const AtomicOrder = builtin.AtomicOrder;
7const Loop = std.event.Loop;7const Loop = std.event.Loop;
88
9/// Thread-safe async/await lock.9/// Thread-safe async/await lock.
10/// Does not make any syscalls - coroutines which are waiting for the lock are suspended, and10/// coroutines which are waiting for the lock are suspended, and
11/// are resumed when the lock is released, in order.11/// are resumed when the lock is released, in order.
12/// Many readers can hold the lock at the same time; however locking for writing is exclusive.12/// Many readers can hold the lock at the same time; however locking for writing is exclusive.
13/// When a read lock is held, it will not be released until the reader queue is empty.13/// When a read lock is held, it will not be released until the reader queue is empty.
std/event/rwlocked.zig+1-1
...@@ -3,7 +3,7 @@ const RwLock = std.event.RwLock;...@@ -3,7 +3,7 @@ const RwLock = std.event.RwLock;
3const Loop = std.event.Loop;3const Loop = std.event.Loop;
44
5/// Thread-safe async/await RW lock that protects one piece of data.5/// Thread-safe async/await RW lock that protects one piece of data.
6/// Does not make any syscalls - coroutines which are waiting for the lock are suspended, and6/// coroutines which are waiting for the lock are suspended, and
7/// are resumed when the lock is released, in order.7/// are resumed when the lock is released, in order.
8pub fn RwLocked(comptime T: type) type {8pub fn RwLocked(comptime T: type) type {
9 return struct {9 return struct {