mirror of
https://github.com/ShareX/ShareX.git
synced 2024-10-06 05:05:42 +13:00
29e8e739e3
Reworked single instance code to better handle being launched with context menu. Previously: - On launch, process would try to open an `EventWaitHandle`. If it didn't exist, then process assumed it was first and created it - Multiple processes launching at same time would all see the `EventWaitHandle` did not exist before any process could create it - This led to multiple instances of program running Now a mutex is used: - Processes will all try to open the mutex. Only first one will succeed - Process that opens the mutex will setup the `EventWaitHandle` - Other processes won't get the mutex and will be directed to use the `EventWaitHandle` to pass their command line args to the running instance |
||
---|---|---|
.. | ||
ApplicationInstanceManager.cs | ||
InstanceProxy.cs |