Steven Giesel 12/27/2023

A new lock type in .NET 9

Read Original

This article details the new System.Threading.Lock type introduced in .NET 9, which provides a more explicit and purpose-built alternative to using a plain object with the `lock` keyword. It explains the current usage, potential performance benefits, and discusses a related compiler proposal for a 'lock statement pattern' that could change how locks are acquired, comparing it to existing patterns like those in the AsyncEx library.

A new lock type in .NET 9

Comments

No comments yet

Be the first to share your thoughts!

Browser Extension

Get instant access to AllDevBlogs from your browser

Top of the Week

1
The Beautiful Web
Jens Oliver Meiert 2 votes
3
LLM Use in the Python Source Code
Miguel Grinberg 1 votes
4
Wagon’s algorithm in Python
John D. Cook 1 votes