#sync #spinwait

spinwait

A Rust implementation of C#'s SpinWait type for lightweight spinning

4 releases

0.1.3 Mar 14, 2025
0.1.2 Mar 14, 2025
0.1.1 Mar 14, 2025
0.1.0 Mar 14, 2025

#15 in #synchronization

MIT license

7KB
103 lines

spinwait

A Rust crate providing a lightweight, adaptive spinning mechanism inspired by C#’s SpinWait type. Designed for high-performance, short-duration waits in concurrent applications, this implementation minimizes context-switching overhead by spinning efficiently before yielding to the scheduler.

Dependencies

~79KB