| author | |
| committer | |
| log | 67cb299f7d7cd88e6843f12865477594843f1496 |
| tree | cb6bf3f66dd3557b658f9491242cd156a02bb8d5 |
| parent | 1a5c3e4501589d50920489caed01ac344bc6f72a |
| parent | 528e3b43a677c0fbd05245fec9e4a6c361b89b59 |
| signature |
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 | const Loop = std.event.Loop; |
| 8 | 8 | |
| 9 | 9 | /// Thread-safe async/await lock. |
| 10 | /// Does not make any syscalls - coroutines which are waiting for the lock are suspended, and | |
| 10 | /// coroutines which are waiting for the lock are suspended, and | |
| 11 | 11 | /// are resumed when the lock is released, in order. |
| 12 | 12 | /// Allows only one actor to hold the lock. |
| 13 | 13 | pub const Lock = struct { |
std/event/locked.zig+1-1| ... | ... | @@ -3,7 +3,7 @@ const Lock = std.event.Lock; |
| 3 | 3 | const Loop = std.event.Loop; |
| 4 | 4 | |
| 5 | 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, and | |
| 6 | /// coroutines which are waiting for the lock are suspended, and | |
| 7 | 7 | /// are resumed when the lock is released, in order. |
| 8 | 8 | pub fn Locked(comptime T: type) type { |
| 9 | 9 | return struct { |
std/event/rwlock.zig+1-1| ... | ... | @@ -7,7 +7,7 @@ const AtomicOrder = builtin.AtomicOrder; |
| 7 | 7 | const Loop = std.event.Loop; |
| 8 | 8 | |
| 9 | 9 | /// Thread-safe async/await lock. |
| 10 | /// Does not make any syscalls - coroutines which are waiting for the lock are suspended, and | |
| 10 | /// coroutines which are waiting for the lock are suspended, and | |
| 11 | 11 | /// are resumed when the lock is released, in order. |
| 12 | 12 | /// Many readers can hold the lock at the same time; however locking for writing is exclusive. |
| 13 | 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 | 3 | const Loop = std.event.Loop; |
| 4 | 4 | |
| 5 | 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, and | |
| 6 | /// coroutines which are waiting for the lock are suspended, and | |
| 7 | 7 | /// are resumed when the lock is released, in order. |
| 8 | 8 | pub fn RwLocked(comptime T: type) type { |
| 9 | 9 | return struct { |