Skip to content

Commit

Permalink
Use pthread_attr_setdetachstate when RT thread fails too
Browse files Browse the repository at this point in the history
Signed-off-by: falkTX <falktx@falktx.com>
  • Loading branch information
falkTX committed Sep 18, 2021
1 parent 4916179 commit babe286
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions source/utils/CarlaThread.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ class CarlaThread
{
carla_stdout("CarlaThread with realtime priority failed on creation, going with normal priority instead");
pthread_attr_init(&attr);
pthread_attr_setdetachstate(&attr, 1);
ok = pthread_create(&handle, &attr, _entryPoint, this) == 0;
pthread_attr_destroy(&attr);
}
Expand Down

0 comments on commit babe286

Please sign in to comment.