So what do you think is the best way to prevent multiple threads of a C# Windows service running simultaneously (the service is using a timer
with the OnElapsed
event) ?
Using lock()
or mutex
?
I can't seem to grasp the concept of the mutex
, but using lock()
seems to work fine for my case.
Should I spend the time learning how to use the mutex
anyways?