1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
//! `proxima::sync::RwLock` — async reader-writer lock, shape-
//! compatible with `tokio::sync::RwLock`. Backed by
//! `async_lock::RwLock` with a thin newtype that reshapes
//! `try_read` / `try_write` from `Option` (async-lock) to
//! `Result<_, TryLockError>` (tokio). The async-lock variant is
//! fair (FIFO across readers and writers) and provides the same
//! `read(&self).await` / `write(&self).await` shape as tokio.
//!
//! # Non-coverage
//!
//! - `read_owned() -> OwnedRwLockReadGuard<T>` /
//! `write_owned() -> OwnedRwLockWriteGuard<T>` — Arc-coupled owned
//! guards. tokio offers these for guards that outlive a borrow of
//! the lock; `async_lock::RwLock` has no analog. Mirror of the
//! `lock_owned` gap on Mutex.
//! - `try_read_owned() -> Result<OwnedRwLockReadGuard<T>, TryLockError>`
//! and `try_write_owned()` — same.
//! - `read_arc()` / `write_arc()` — async-lock's Arc-coupled variants;
//! not re-exported because no caller currently needs them.
//! - `RwLock::blocking_read()` / `RwLock::blocking_write()` — sync-
//! context acquisition. Don't use sync acquisition from async code.
pub use ;
use crateTryLockError;
/// Async reader-writer lock matching `tokio::sync::RwLock`'s shape.
;