Top |
Functions
void | bg_set_spare_its () |
ITSignaler * | bg_get_spare_its () |
void | bg_set_spare_gda_worker () |
GdaWorker * | bg_get_spare_gda_worker () |
void | bg_join_thread () |
void | bg_update_stats () |
Functions
bg_set_spare_its ()
void
bg_set_spare_its (ITSignaler *its
);
This function requests that the "background" handle the caching or the destruction of its
. It is intended to be called
only from within the itsignaler_unref()
method when the reference count is 0, but right before destroying it.
The caller (the ITSIgnaler's code) must first set the reference count to 1 (and not destroy the object).
bg_get_spare_its ()
ITSignaler *
bg_get_spare_its (void
);
Requests the "background" thread to provide a ITSignaler which it has kept as a cache (see bg_set_spare_its()
).
The return value may be NULL
(if no ITSignaler object is available), or a pointer to a ITSignaler which refcount is 1.
bg_set_spare_gda_worker ()
void
bg_set_spare_gda_worker (GdaWorker *worker
);
This function requests that the "background" handle the caching or the destruction of worker
. It is intended to be called
only from within the gda_worker_unref()
method when the reference count is 0, but right before destroying it.
The caller (the GdaWorker's code) must first set the reference count to 1 (and not destroy the object).
bg_get_spare_gda_worker ()
GdaWorker *
bg_get_spare_gda_worker (void
);
Requests the "background" thread to provide a GdaWorker which it has kept as a cache (see bg_set_spare_gda_worker()
).
The return value may be NULL
(if no GdaWorker object is available), or a pointer to a GdaWorker which refcount is 1
and which has a worker thread available immediately (no job pending or in process).
bg_join_thread ()
void
bg_join_thread ();
This function must be called by a thread right before it exits, it tells the "background" thread that
it can call g_thread_join()
without having the risk of blocking. It is called by worker threads right before
they exit.