rust-std

rust std sync

lock free & wait free“Lock-free” and “wait-free” are two different approaches to designing concurrent algorithms and data structures. Both aim to provide efficient and non-blocking synchron…

Read article
rust

rust concurrency

Send and Sync A type is Send if it is safe to send it to another thread. A type is Sync if it is safe to share between threads (T is Sync if and only if &T is Send). raw pointers are neithe…

Read article
rust-std

rust std data structure (2D)

collectionsBTreeMap clear(&mut self) Clears the map, removing all elements. get(&self, key: &Q) Returns a reference to the value corresponding to the key. get_key_value(&self, k: &Q) first_…

Read article
rust-std

rust std data structure (1D)

arrayA fixed-size array, denoted [T; N], for the element type, T, and the non-negative compile-time constant size, N. sliceA dynamically-sized view into a contiguous sequence, [T]. len(): R…

Read article
rust

rust functional programming

iterator iter() Returns an iterator over the slice into_iter() Creates a consuming iterator, that is, one that moves each value out of the vector iter_mut() Returns an iterator that allows …

Read article
geth

geth state prune

NOTE: Offline pruning is only for the hash-based state scheme. In future release, geth will have a path-based state scheme which enables the pruning by default. Once the hash-based state sc…

Read article