mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-10-07 14:10:05 +02:00
GThread: deprecate thread priorities
Thread priorities were already documented as not working on Solaris, and they are meaningless on Linux unless the process separately requests realtime scheduling (and even then, it appears only to work as root). We can safely put a NULL into the vtable for set_priority since nothing outside of gthread.c ever calls this (and that call is gone).
This commit is contained in:
@@ -50,6 +50,9 @@ typedef enum
|
||||
|
||||
typedef gpointer (*GThreadFunc) (gpointer data);
|
||||
|
||||
/* This is "deprecated", but we can't actually remove it since
|
||||
* g_thread_create_full takes it.
|
||||
*/
|
||||
typedef enum
|
||||
{
|
||||
G_THREAD_PRIORITY_LOW,
|
||||
@@ -188,9 +191,8 @@ GMutex* g_static_mutex_get_mutex_impl (GMutex **mutex);
|
||||
#define g_thread_supported() (g_threads_got_initialized)
|
||||
#endif
|
||||
|
||||
#define g_thread_create(func, data, joinable, error) \
|
||||
(g_thread_create_full (func, data, 0, joinable, FALSE, \
|
||||
G_THREAD_PRIORITY_NORMAL, error))
|
||||
#define g_thread_create(func, data, joinable, error) \
|
||||
(g_thread_create_full (func, data, 0, joinable, FALSE, 0, error))
|
||||
|
||||
GThread* g_thread_create_full (GThreadFunc func,
|
||||
gpointer data,
|
||||
@@ -204,8 +206,10 @@ void g_thread_exit (gpointer retval);
|
||||
gpointer g_thread_join (GThread *thread);
|
||||
void g_thread_yield (void);
|
||||
|
||||
#ifndef G_DISABLE_DEPRECATED
|
||||
void g_thread_set_priority (GThread *thread,
|
||||
GThreadPriority priority);
|
||||
#endif
|
||||
|
||||
#ifdef G_OS_WIN32
|
||||
typedef GMutex * GStaticMutex;
|
||||
|
Reference in New Issue
Block a user