JHinW / Issues

self-noted
0 stars 0 forks source link

Locker VS AsyncLocker #14

Open JHinW opened 6 years ago

JHinW commented 6 years ago

https://blog.cdemi.io/async-waiting-inside-c-sharp-locks/

JHinW commented 6 years ago

semaphore : This is a system wide semaphore, so it can be used between multiple processes.

semaphoreSlim : Used for waiting within a single process when wait times are expected to be very short.

JHinW commented 6 years ago

ManulEventSet VS ManualEventSetSlim

https://github.com/Microsoft/referencesource/blob/7de0d30c7c5ef56ab60fee41fcdb50005d24979a/mscorlib/system/threading/ManualResetEventSlim.cs#L631

Lock and notify with Monitor.PulseAll method