Improve locking performance on .NET 9.0+#1991
Improve locking performance on .NET 9.0+#1991patriksvensson merged 5 commits intospectreconsole:mainfrom
Conversation
|
If I recall, this project has a source generator that would allow this to work without taking on a dependency. I'd be interested in seeing how that looks too. |
Happy new year Phil. Indeed it does and this PR sets it up to use it as a source generator rather than taking on the dependency. |
|
Sorry for not getting back to you sooner about this PR. The PR needs to be rebased against upstream and have the merge conflicts resolved. I can do this for you, but it will take a couple of days since I'm away on vacation. |
|
Done @patriksvensson |
|
@MarkCiliaVincenti Seems to be a merge conflict now 😅 |
|
@patriksvensson merged, but this is starting to get a bit frustrating so I'm hoping it gets merged in sooner rather than later. |
|
That's how things are with open source. |
|
Merged! Thank you for your contribution. Much appreciated! 👍 |
fixes #1990
Changes
Switched from locking on an object to System.Threading.Lock on .NET 9.0 or later, except in cases where we are yielding inside a lock, since this is not supported by System.Threading.Lock.
Makes use of a source generator.
Please upvote 👍 this pull request if you are interested in it.