GdaThreader

GdaThreader

Synopsis

                    GdaThreader;
void                (*GdaThreaderFunc)                  (GdaThreader *,
                                                         guint ,
                                                         gpointer );
GObject*            gda_threader_new                    (void);
guint               gda_threader_start_thread           (GdaThreader *thread,
                                                         GThreadFunc func,
                                                         gpointer func_arg,
                                                         GdaThreaderFunc ok_callback,
                                                         GdaThreaderFunc cancel_callback,
                                                         GError **error);
void                gda_threader_cancel                 (GdaThreader *thread,
                                                         guint job_id);

Object Hierarchy

  GObject
   +----GdaThreader

Signals

  "cancelled"                                      : Run First
  "finished"                                       : Run First

Description

Details

GdaThreader

typedef struct _GdaThreader GdaThreader;


GdaThreaderFunc ()

void                (*GdaThreaderFunc)                  (GdaThreader *,
                                                         guint ,
                                                         gpointer );

Param1 :

Param2 :

Param3 :


gda_threader_new ()

GObject*            gda_threader_new                    (void);

Creates a new GdaThreader object. This object class is normally not instantiated directly but through child classes objects' intantiation

Returns :

the newly created object

gda_threader_start_thread ()

guint               gda_threader_start_thread           (GdaThreader *thread,
                                                         GThreadFunc func,
                                                         gpointer func_arg,
                                                         GdaThreaderFunc ok_callback,
                                                         GdaThreaderFunc cancel_callback,
                                                         GError **error);

thread :

a GdaThreader object

func :

the function to be called in the newly created thread

func_arg :

func's argument

ok_callback :

callback called when func terminates

cancel_callback :

callback called when func terminates and the job has been cancelled

error :

place to store an error when creating the thread or NULL

Returns :

the id of the new job executed in another thread.

gda_threader_cancel ()

void                gda_threader_cancel                 (GdaThreader *thread,
                                                         guint job_id);

thread :

job_id :

Signal Details

The "cancelled" signal

void                user_function                      (GdaThreader *gdathreader,
                                                        guint        arg1,
                                                        gpointer     arg2,
                                                        gpointer     user_data)        : Run First

gdathreader :

the object which received the signal.

arg1 :

arg2 :

user_data :

user data set when the signal handler was connected.

The "finished" signal

void                user_function                      (GdaThreader *gdathreader,
                                                        guint        arg1,
                                                        gpointer     arg2,
                                                        gpointer     user_data)        : Run First

gdathreader :

the object which received the signal.

arg1 :

arg2 :

user_data :

user data set when the signal handler was connected.