<refentry id="GdaThread">
<refmeta>
<refentrytitle>GdaThread</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>LIBGDA-COMMON Library</refmiscinfo>
</refmeta>

<refnamediv>
<refname>GdaThread</refname><refpurpose>Thread support functions</refpurpose>
</refnamediv>

<refsynopsisdiv><title>Synopsis</title>
<synopsis>



<link linkend="gpointer">gpointer</link>    (<link linkend="GdaThreadFunc">*GdaThreadFunc</link>)                (<link linkend="GdaThread">GdaThread</link> *thr,
                                             <link linkend="gpointer">gpointer</link> user_data);
<link linkend="GdaThread">GdaThread</link>*  <link linkend="gda-thread-new">gda_thread_new</link>                  (<link linkend="GdaThreadFunc">GdaThreadFunc</link> func);
void        <link linkend="gda-thread-free">gda_thread_free</link>                 (<link linkend="GdaThread">GdaThread</link> *thr);
void        <link linkend="gda-thread-start">gda_thread_start</link>                (<link linkend="GdaThread">GdaThread</link> *thr,
                                             <link linkend="gpointer">gpointer</link> user_data);
void        <link linkend="gda-thread-stop">gda_thread_stop</link>                 (<link linkend="GdaThread">GdaThread</link> *thr);
<link linkend="gboolean">gboolean</link>    <link linkend="gda-thread-is-running">gda_thread_is_running</link>           (<link linkend="GdaThread">GdaThread</link> *thr);

</synopsis>
</refsynopsisdiv>

<refsect1>
<title>Object Hierarchy</title>
<synopsis>

  <link linkend="GtkObject">GtkObject</link>
   +----GdaThread
</synopsis>

</refsect1>




<refsect1>
<title>Description</title>
<para>
This module (still in development, DON'T USE IT) provides a convenient way
of adding multithread support to GDA applications. As with some other
libgda-common modules, this is intended to be used internally in other
GDA parts, but it is also made available for GDA application supports.
</para>
<para>
Using this module will allow you to forget about the actual thread
implementation available on your system.
</para>
</refsect1>

<refsect1>
<title>Details</title>
<refsect2>
<title><anchor id="GdaThreadFunc">GdaThreadFunc ()</title>
<programlisting><link linkend="gpointer">gpointer</link>    (*GdaThreadFunc)                (<link linkend="GdaThread">GdaThread</link> *thr,
                                             <link linkend="gpointer">gpointer</link> user_data);</programlisting>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>thr</parameter>&nbsp;:</entry>
<entry>
</entry></row>
<row><entry align="right"><parameter>user_data</parameter>&nbsp;:</entry>
<entry>
</entry></row>
<row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry>


</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gda-thread-new">gda_thread_new ()</title>
<programlisting><link linkend="GdaThread">GdaThread</link>*  gda_thread_new                  (<link linkend="GdaThreadFunc">GdaThreadFunc</link> func);</programlisting>
<para>
Create a new <link linkend="GdaThread">GdaThread</link> object. This function just creates the internal
structures and initializes all the data, but does not start the thread.
To do so, you must use <link linkend="gda-thread-start">gda_thread_start</link>.</para>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>func</parameter>&nbsp;:</entry>
<entry> function to be called
</entry></row>
<row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry>


</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gda-thread-free">gda_thread_free ()</title>
<programlisting>void        gda_thread_free                 (<link linkend="GdaThread">GdaThread</link> *thr);</programlisting>
<para>
</para>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>thr</parameter>&nbsp;:</entry>
<entry>


</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gda-thread-start">gda_thread_start ()</title>
<programlisting>void        gda_thread_start                (<link linkend="GdaThread">GdaThread</link> *thr,
                                             <link linkend="gpointer">gpointer</link> user_data);</programlisting>
<para>
</para>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>thr</parameter>&nbsp;:</entry>
<entry> a <link linkend="GdaThread">GdaThread</link> object
</entry></row>
<row><entry align="right"><parameter>user_data</parameter>&nbsp;:</entry>
<entry> data to pass to signals
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gda-thread-stop">gda_thread_stop ()</title>
<programlisting>void        gda_thread_stop                 (<link linkend="GdaThread">GdaThread</link> *thr);</programlisting>
<para>
</para>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>thr</parameter>&nbsp;:</entry>
<entry>


</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gda-thread-is-running">gda_thread_is_running ()</title>
<programlisting><link linkend="gboolean">gboolean</link>    gda_thread_is_running           (<link linkend="GdaThread">GdaThread</link> *thr);</programlisting>
<para>
Checks whether the given thread object is running or not</para>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>thr</parameter>&nbsp;:</entry>
<entry> a <link linkend="GdaThread">GdaThread</link> object
</entry></row>
<row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry>


</entry></row>
</tbody></tgroup></informaltable></refsect2>

</refsect1>




</refentry>
