Skip to content

GThreadPool - Don't inherit thread priorities when creating new threads

Sebastian Dröge requested to merge sdroege/glib:threadpool-inherit-prio into master

See #1834 (closed) , this implements the first step of the solution discussed with Philip.

commit 0d6bd6718bdc62623e6f39262a67b1b130742be8
Author: Sebastian Dröge <sebastian@centricular.com>
Date:   Tue Sep 17 17:25:26 2019 +0300

    GThreadPool - Don't inherit thread priorities when creating new threads
    
    By default (on POSIX) we would be inheriting thread priorities from the
    thread that pushed a new task on the thread pool and causes a new thread
    to be created. This can cause the thread pool to accidentally contain
    threads of different priorities, or e.g. threads with real-time
    priority.
    
    Fixes https://gitlab.gnome.org/GNOME/glib/issues/1834

Also includes a second commit to make behaviour between Win32 and POSIX the same

commit af65b8c55fee5f96370bf4c6b722f5c62034cbe3 (HEAD -> threadpool-inherit-prio)
Author: Sebastian Dröge <sebastian@centricular.com>
Date:   Tue Sep 17 17:27:50 2019 +0300

    GThread - Inherit parent thread priority by default for new Win32 threads
    
    This is the default behaviour on POSIX and having different behaviour
    between the two GThread implementations could lead to subtle problems.

Merge request reports