Skip to content
  • Sebastian Dröge's avatar
    GThreadPool - Don't inherit thread priorities when creating new threads · 8aeca4fa
    Sebastian Dröge authored
    By default (on POSIX) we would be inheriting thread priorities from the
    thread that pushed a new task on non-exclusive thread pools and causes a
    new thread to be created. This can cause any non-exclusive thread pool
    to accidentally contain threads of different priorities, or e.g. threads
    with real-time priority.
    
    To prevent this, custom handling for setting the scheduler settings for
    Linux and Windows is added and as a fallback for other platforms a new
    thread is added that is responsible for spawning threads for
    non-exclusive thread pools.
    
    Fixes GNOME/glib#1834
    8aeca4fa