.NET Synchronisation APIs - Part 2 - Out-of-Process Synchronisation
Introduction This is the second in a series of posts on .NET synchronisation: In-process synchronisation Out-of-process synchronisation on the same machine (this post) Distributed synchronisation This time I'm going to talk about using the synchronisation APIs I described on the first post , dedicated to in-process synchronisation, but in out-of-process context, meaning, to synchronise different processes, not threads. This can be achieved out of the box with three synchronisation objects: Mutex Semaphore EventWaitHandle (remember, parent class of AutoResetEvent and ManualResetEvent ) These objects follow the same pattern: open (fails if doesn't exist) or try to open an existing object by its name. For a synchronisation object to be available system-wide it needs a name and can have fine-grained permissions on Windows systems. I will cover permissions more to the end of this post. I will also be covering an additional technique that can also be used for synchronisation: s h...