Performance Improvement by Replacing ManualResetEvent with ManualResetEventSlim in DispatcherOperationEvent Class?
- Dominant language
- C#
- Stars
- 7.7k
- Forks
- 1.3k
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 61
Description
Hello,
I am currently working with the DispatcherOperationEvent class constantly and I am considering replacing the ManualResetEvent type with ManualResetEventSlim. I am wondering if this could potentially lead to any performance improvements?
https://github.com/dotnet/wpf/blob/5847e0a4899c8771d1f39fa20fdd3b112e42e34b/src/Microsoft.DotNet.Wpf/src/WindowsBase/System/Windows/Threading/DispatcherOperation.cs#L624
I understand that ManualResetEventSlim is a lighter weight alternative and is recommended for short wait durations. However, I am not sure if this applies to the context of the DispatcherOperationEvent class and if there would be any noticeable performance benefits.
Any insights or suggestions would be greatly appreciated.
Contributor guide
Assessment
This issue has not been assessed yet.