dotnet-7 / thread-sentry
PublicHigh-performance deadlock & race condition detector for Rust with <5% overhead. Production-ready, zero-intrusion monitoring.
Thread-Sentry is a Rust library that acts like a safety monitor for programs with multiple tasks running at the same time. It watches your code as it runs and catches two common problems: deadlocks (when your program freezes because tasks are waiting for each other in a circle) and race conditions (when data gets corrupted because multiple tasks modify the same information without proper coordination). Unlike older tools that slow down your program by 10-50 times, Thread-Sentry adds less than 5% overhead, so you can safely run it even in production. To use it, you simply replace your standard locks with Thread-Sentry's monitored versions, and it automatically reports any issues it finds with precise details about what went wrong, which parts of your code were involved, and where exactly to look for the fix.
How It Works
Your program freezes randomly or produces wrong results, and you suspect it's related to how different parts of your code run simultaneously.
You include Thread-Sentry as a dependency in your project so it can watch over your program's concurrent operations.
You replace your standard locks with Thread-Sentry's monitored versions—just changing one word in your code.
Your program starts up normally, but Thread-Sentry quietly watches everything happening in the background.
No concurrency problems detected—your program is safe and Thread-Sentry confirms everything is working correctly.
Thread-Sentry immediately shows you exactly where the issue is, which threads are involved, and the sequence of events that caused it.
With the detailed report in hand, you understand exactly what went wrong and can redesign your code to avoid the deadlock or race condition.
Your program now handles concurrent operations correctly, with Thread-Sentry watching over it in the background to catch any future issues.
Star Growth
Repurpose is a Pro feature
Generate ready-to-use prompts for X threads, LinkedIn posts, blog posts, YouTube scripts, and more -- with full repo context baked in.
Unlock RepurposeSimilar repos coming soon.