aboutsummaryrefslogtreecommitdiff
path: root/std/event/rwlock.zig
diff options
context:
space:
mode:
authorAndrew Kelley <superjoe30@gmail.com>2018-08-03 17:22:17 -0400
committerAndrew Kelley <superjoe30@gmail.com>2018-08-03 17:22:17 -0400
commit5dfcd09e496160054d4f333500d084e35f2fbdd2 (patch)
tree08f4177b091848c1b78ec8e7c1d7973ee230391a /std/event/rwlock.zig
parent7f6e97cb26ffabbc192e7ccdf44aebbbc3be751d (diff)
downloadzig-5dfcd09e496160054d4f333500d084e35f2fbdd2.tar.gz
zig-5dfcd09e496160054d4f333500d084e35f2fbdd2.zip
self-hosted: watch files and trigger a rebuild
Diffstat (limited to 'std/event/rwlock.zig')
-rw-r--r--std/event/rwlock.zig2
1 files changed, 2 insertions, 0 deletions
diff --git a/std/event/rwlock.zig b/std/event/rwlock.zig
index 0e2407bf31..186c81eb76 100644
--- a/std/event/rwlock.zig
+++ b/std/event/rwlock.zig
@@ -10,6 +10,8 @@ const Loop = std.event.Loop;
/// Does not make any syscalls - coroutines which are waiting for the lock are suspended, and
/// are resumed when the lock is released, in order.
/// Many readers can hold the lock at the same time; however locking for writing is exclusive.
+/// When a read lock is held, it will not be released until the reader queue is empty.
+/// When a write lock is held, it will not be released until the writer queue is empty.
pub const RwLock = struct {
loop: *Loop,
shared_state: u8, // TODO make this an enum