Commit fa6e0b4 1 parent 9e20fec commit fa6e0b4 Copy full SHA for fa6e0b4
File tree 1 file changed +8
-7
lines changed
1 file changed +8
-7
lines changed Original file line number Diff line number Diff line change 11
11
//! # The parking lot
12
12
//!
13
13
//! To keep synchronization primitives small, all thread queuing and suspending
14
- //! functionality is offloaded to the *parking lot*. The idea behind this is
15
- //! based on the Webkit [`WTF::ParkingLot`]
16
- //! (https://webkit.org/blog/6161/locking-in-webkit/) class, which essentially
17
- //! consists of a hash table mapping of lock addresses to queues of parked
18
- //! (sleeping) threads. The Webkit parking lot was itself inspired by Linux
19
- //! [futexes](http://man7.org/linux/man-pages/man2/futex.2.html), but it is more
20
- //! powerful since it allows invoking callbacks while holding a queue lock.
14
+ //! functionality is offloaded to the *parking lot*. The idea behind this is based
15
+ //! on the Webkit [`WTF::ParkingLot`](https://webkit.org/blog/6161/locking-in-webkit/)
16
+ //! class, which essentially consists of a hash table mapping of lock addresses
17
+ //! to queues of parked (sleeping) threads. The Webkit parking lot was itself
18
+ //! inspired by Linux [futexes](http://man7.org/linux/man-pages/man2/futex.2.html),
19
+ //! but it is more powerful since it allows invoking callbacks while holding a
20
+ //! queue lock.
21
21
//!
22
22
//! There are two main operations that can be performed on the parking lot:
23
+ //!
23
24
//! - *Parking* refers to suspending the thread while simultaneously enqueuing it
24
25
//! on a queue keyed by some address.
25
26
//! - *Unparking* refers to dequeuing a thread from a queue keyed by some address
You can’t perform that action at this time.
0 commit comments