Cross-Process Locking in C#

后端 未结 5 1005
时光说笑
时光说笑 2020-12-05 05:37

I\'ve written an API that will be used on the same box in (1) a windows service, (2) a web application, and (3) a windows forms application. They all need to share a very s

5条回答
  •  再見小時候
    2020-12-05 05:59

    Use an EventWaitHandle object to construct a named event that each process can lock or block on. Works in .NET 2.0 and later.

提交回复
热议问题