8 releases (5 breaking)

0.6.0 Aug 4, 2024
0.5.1 Aug 2, 2024
0.4.3 Aug 1, 2024
0.3.0 Jul 26, 2024
0.1.1 Jul 26, 2024

#618 in Rust patterns

Download history 202/week @ 2024-07-24 612/week @ 2024-07-31 58/week @ 2024-08-07 111/week @ 2024-08-14 349/week @ 2024-08-21 351/week @ 2024-08-28

886 downloads per month

MIT license

19KB
377 lines

init_once

The init_once crate provides a mechanic to attempt to read a value without blocking the caller, in case it is being initialized concurrently. Such an abstraction might be useful in cache implementations whose consumers might not want to block on the cache to fill up with data.


lib.rs:

The init_once crate provides a mechanic to attempt to read a value without blocking the caller, in case it is being initialized concurrently. Such an abstraction might be useful in cache implementations whose consumers might not want to block on the cache to fill up with data.

Dependencies

~1MB
~15K SLoC