Menu

#ThReadIng

5 posts

Feed·
5 of 5 posts
When lock no longer means Monitor
📰
0Read More

When lock no longer means Monitor

DEV Community: csharp·Zero Heartbeat·8 days ago
#VJk06D2t
#devtocsharp#devto#dev#lock#system

In C# 13, lock over a System.Threading.Lock compiles to EnterScope() and a disposed ref struct — not Monitor.Enter/Exit. Here is both lowerings in IL, why the type of the locked expression decides which one you get, and how Glass tells them apart instead…

15s