mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-09 00:04:56 +01:00
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
1 changed files with 2 additions and 1 deletions
|
|
@ -25,7 +25,8 @@ using namespace PBD;
|
||||||
Semaphore::Semaphore (const char* name, int val)
|
Semaphore::Semaphore (const char* name, int val)
|
||||||
{
|
{
|
||||||
#ifdef WINDOWS_SEMAPHORE
|
#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 ();
|
throw failed_constructor ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue