#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

#431 in Concurrency

Download history 219/week @ 2025-03-09 85/week @ 2025-03-16 8/week @ 2025-03-23

312 downloads per month

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