Thread safe Queue in Rust 🦀

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:

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store