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:
parent
e91fd1fce6
commit
be6d0fa95c
@ -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 ();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user