Browse Source

Use pthread_attr_setdetachstate when RT thread fails too

Signed-off-by: falkTX <falktx@falktx.com>
tags/v2.4.1
falkTX 3 years ago
parent
commit
babe286631
Signed by: falkTX <falktx@falktx.com> GPG Key ID: CDBAA37ABC74FBA0
1 changed files with 1 additions and 0 deletions
  1. +1
    -0
      source/utils/CarlaThread.hpp

+ 1
- 0
source/utils/CarlaThread.hpp View File

@@ -137,6 +137,7 @@ public:
{ {
carla_stdout("CarlaThread with realtime priority failed on creation, going with normal priority instead"); carla_stdout("CarlaThread with realtime priority failed on creation, going with normal priority instead");
pthread_attr_init(&attr); pthread_attr_init(&attr);
pthread_attr_setdetachstate(&attr, 1);
ok = pthread_create(&handle, &attr, _entryPoint, this) == 0; ok = pthread_create(&handle, &attr, _entryPoint, this) == 0;
pthread_attr_destroy(&attr); pthread_attr_destroy(&attr);
} }


Loading…
Cancel
Save