Look for nanosleep function.
[platform/upstream/glib.git] / docs / reference / glib / tmpl / threads.sgml
index 91a9bbf..80f2c71 100644 (file)
@@ -220,7 +220,7 @@ you can however use it as if it was a function.
 <!-- ##### USER_FUNCTION GThreadFunc ##### -->
 <para>
 Specifies the type of the @func functions passed to
-g_thread_create().
+g_thread_create() or g_thread_create_full().
 </para>
 
 @data: data passed to the thread
@@ -265,11 +265,38 @@ g_thread_join() is called for that thread.
 @func: the function executing in that thread
 @data: the argument to the function
 @joinable: is this thread joinable?
-@bound: is this thread bound to a system thread?
 @priority: the priority of the thread
 
 <!-- ##### FUNCTION g_thread_create ##### -->
 <para>
+This function creates a new thread with the priority @priority.
+</para>
+
+<para>
+If @joinable is #TRUE, you can wait for this threads termination
+calling g_thread_wait(). Otherwise the thread will just disappear, when
+ready. 
+</para>
+
+<para>
+The new thread executes the function @func with the argument
+@data. If the thread was created successfully, it is returned.
+</para>
+
+<para>
+@error can be NULL to ignore errors, or non-NULL to report errors. The
+error is set, if and only if the function returns #NULL.
+</para>
+
+@func: a function to execute in the new thread
+@data: an argument to supply to the new thread
+@joinable: should this thread be joinable?
+@error: return location for error.
+@Returns: the new #GThread on success
+
+
+<!-- ##### FUNCTION g_thread_create_full ##### -->
+<para>
 This function creates a new thread with the priority @priority. The
 stack gets the size @stack_size or the default value for the current
 platform, if @stack_size is 0.
@@ -305,6 +332,15 @@ default.
 </para>
 </note>
 
+<note>
+<para>
+Only use g_thread_create_full(), when you really can't use
+g_thread_create() instead. g_thread_create() does not take
+@stack_size, @bound and @priority as arguments, as they should only be
+used for cases, where it is inevitable. 
+</para>
+</note>
+
 @func: a function to execute in the new thread
 @data: an argument to supply to the new thread
 @stack_size: a stack size for the new thread
@@ -1330,6 +1366,11 @@ This function can also be used, if g_thread_init() has not yet been
 called and will immediately return TRUE then.
 </para>
 
+<para>
+To easily calculate @abs_time a combination of g_get_current_time()
+and g_time_val_add() can be used.
+</para>
+
 @cond: a #GCond
 @mutex: a #GMutex, that is currently locked
 @abs_time: a #GTimeVal, determining the final time