summaryrefslogtreecommitdiff
path: root/glib/src/threads.ccg
diff options
context:
space:
mode:
Diffstat (limited to 'glib/src/threads.ccg')
-rw-r--r--glib/src/threads.ccg14
1 files changed, 11 insertions, 3 deletions
diff --git a/glib/src/threads.ccg b/glib/src/threads.ccg
index 78369d53..7133a3d6 100644
--- a/glib/src/threads.ccg
+++ b/glib/src/threads.ccg
@@ -65,13 +65,21 @@ namespace Threads
/**** Glib::Thread *********************************************************/
// static
-Thread* Thread::create(const sigc::slot<void>& slot, bool /* joinable */)
+Thread* Thread::create(const sigc::slot<void>& slot)
{
// Make a copy of slot on the heap
sigc::slot_base *const slot_copy = new sigc::slot<void>(slot);
- GThread *const thread = g_thread_new(NULL,
- &call_thread_entry_slot, slot_copy);
+ GError* error = 0;
+
+ GThread *const thread = g_thread_try_new(NULL,
+ &call_thread_entry_slot, slot_copy, &error);
+
+ if(error)
+ {
+ delete slot_copy;
+ Glib::Error::throw_exception(error);
+ }
return reinterpret_cast<Thread*>(thread);
}