13
0

Do not use named semaphores on Windows since they are system wide

https://docs.microsoft.com/en-us/dotnet/standard/threading/semaphore-and-semaphoreslim#named-semaphores

Running multiple instances of Ardour or Ardour/Mixbus would fail in very
odd ways since they would signal each other. Unnamed sems are
correct for this use case.
This commit is contained in:
Todd Naugle 2021-05-27 15:13:40 -05:00
parent e91fd1fce6
commit be6d0fa95c

View File

@ -25,7 +25,8 @@ using namespace PBD;
Semaphore::Semaphore (const char* name, int val)
{
#ifdef WINDOWS_SEMAPHORE
if ((_sem = CreateSemaphore(NULL, val, 32767, name)) == NULL) {
(void) name; /* stop warning */
if ((_sem = CreateSemaphore(NULL, val, 32767, NULL)) == NULL) {
throw failed_constructor ();
}