|
|
|
@ -415,14 +415,15 @@ void TQThread::start(Priority priority)
|
|
|
|
|
// The correct thread_id is set in TQThreadInstance::start using the value of d->args[1]
|
|
|
|
|
d->thread_id = 0;
|
|
|
|
|
|
|
|
|
|
// Legacy glib versions require this threading system initialization call
|
|
|
|
|
if (!GLIB_CHECK_VERSION (2, 32, 0)) {
|
|
|
|
|
if( ! g_thread_get_initialized () ) {
|
|
|
|
|
g_thread_init(NULL);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
// glib versions < 2.32.0 requires threading system initialization call
|
|
|
|
|
#if GLIB_CHECK_VERSION(2, 32, 0)
|
|
|
|
|
GThread* glib_thread_handle = g_thread_new( NULL, (GThreadFunc)TQThreadInstance::start, d->args );
|
|
|
|
|
#else
|
|
|
|
|
if( !g_thread_get_initialized() );
|
|
|
|
|
g_thread_init(NULL);
|
|
|
|
|
GThread* glib_thread_handle = g_thread_create((GThreadFunc)TQThreadInstance::start, d->args, false, NULL);
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
GThread* glib_thread_handle = g_thread_create((GThreadFunc)TQThreadInstance::start, d->args, false, NULL);
|
|
|
|
|
if (glib_thread_handle) {
|
|
|
|
|
ret = 0;
|
|
|
|
|
}
|
|
|
|
|