rust-atomics-and-locks icon indicating copy to clipboard operation
rust-atomics-and-locks copied to clipboard

Code examples, data structures, and links from my book, Rust Atomics and Locks.

Results 14 rust-atomics-and-locks issues
Sort by recently updated
recently updated
newest added

### The content that the question is about ``` use std::sync::atomic::AtomicI32; use std::sync::atomic::Ordering::Relaxed; use std::thread; static X: AtomicI32 = AtomicI32::new(0); static Y: AtomicI32 = AtomicI32::new(0); fn main() { let a...

question

### Type of error Typo ### Location of the error ![3D63E617-DF5E-4357-B6C5-D1503D9276CE](https://github.com/m-ou-se/rust-atomics-and-locks/assets/59018630/204e2634-2fab-4875-b4aa-b0e55e4e9dda) ![CC72D52B-0CAF-450D-AF77-70A87A38D962](https://github.com/m-ou-se/rust-atomics-and-locks/assets/59018630/d19d4aa2-d96b-488f-8c5b-69c19f563ba6) ### Description of the error win7 msvc2015 rust nightly 1.72 i686

errata
unconfirmed

### The content that the question is about _No response_ ### The question Isn't the final wake_one() call of the second thread redundant?

question

### The content that the question is about The store in `READY`: https://github.com/m-ou-se/rust-atomics-and-locks/blob/main/examples/ch3-11-fence.rs#L17 ### The question The atomics in `READY` are only read with `Relaxed` ordering in line 21. Can't...

question

### The content that the question is about _No response_ ### The question In the last example in chapter 5, if the sender is dropped without sending, won't the reciever...

question

### The content that the question is about https://marabos.nl/atomics/memory-ordering.html#happens-before > More interestingly, the output can also be 0 20, even though there is no possible globally consistent order of the...

question

https://github.com/m-ou-se/rust-atomics-and-locks/blob/d945e828bd08719a2d7cb6d758be4611bd90ba2b/src/ch9_locks/rwlock_3.rs#L61C26-L61C26 I guess it checks if it's even number.

### The content that the question is about https://marabos.nl/atomics/basics.html#naming-clones ### The question This section contains the following code example: ```rust let a = Arc::new([1, 2, 3]); thread::spawn({ let a =...

question

### The content that the question is about In the section of Chapter 1 related to condition variables (https://marabos.nl/atomics/basics.html#condvar), we can found the following example: ```rust use std::sync::Condvar; let queue...

question

### The content that the question is about _No response_ ### The question Here are a couple of other notes that I took while going through the book that are...

question