Get the latest tech news

Rust's Sneaky Deadlock With `if let` Blocks


Rust is my favorite programming language. I've been writing Rust for about 6 years, from college to professionally, and I'm vocal about how helpful the compi...

I've been writing Rust for about 6 years, from college to professionally, and I'm vocal about how helpful the compiler is in catching particularly nasty multithreaded issues and memory bugs. Generally, this is fine, and you can sus out if a program is going to cause a deadlock by just making sure you aren't acquiring multiple simultaneous locks. I wrote this block because this has specifically bitten different Rust crates in the wasmCloud project multiple times (most recently and I hoped to prevent the same mistake for others.

Get the Android app

Or read this on Hacker News

Read more on:

Photo of blocks

blocks

Photo of Rust

Rust

Photo of sneaky deadlock

sneaky deadlock

Related news:

News photo

Rust Needs an Official Specification

News photo

Maelstrom: High-Performance Matrix Home-Server Written in Rust

News photo

Parsing arguments in Rust with no dependencies