Thread safe Queue in Rust 🦀

Federico Vitale
5 min readJan 21, 2023
Photo by Mae Mu on Unsplash

I started my rust journey 1 year ago and I feel like it helped me a lot to become a better developer, even if I primarily work with React and Typescript.

Today I’d like to share with you what I learned about thread safety in rust, by implementing a simple data structure such as a FIFO queue.

Let’s get started by declaring a trait to describe our queues:

--

--

Federico Vitale

Software Engineer. Currently into Typescript, Rust and go