the instance to connect to
a string of the form "signal-name::detail"
set to true if callback is to be invoked only if the signal has been emitted while in wrapper's private sub thread (ie. used when wrapper is executing some functions specified by gda.thread_wrapper.ThreadWrapper.execute or gda.thread_wrapper.ThreadWrapper.executeVoid), and to false if the callback is to be invoked whenever the signal is emitted, independently of the thread in which the signal is emitted.
set to true if callback is to be invoked only if the signal has been emitted when a job created for the calling thread is being executed, and to false if callback has to be called whenever the sig_name signal is emitted by instance. Note that this argument is not taken into account if private_thread is set to false.
a #GdaThreadWrapperCallback function
the handler ID
Connects a callback function to a signal for a particular object. The difference with g_signal_connect() and similar functions are: <itemizedlist> <listitem><para>the callback argument is not a #GCallback function, so the callback signature is not dependent on the signal itself</para></listitem> <listitem><para>the signal handler must not have to return any value</para></listitem> <listitem><para>the callback function will be called asynchronously, the caller may need to use gda.thread_wrapper.ThreadWrapper.iterate to get the notification</para></listitem> <listitem><para>if private_job and private_thread control in which case the signal is propagated.</para></listitem> </itemizedlist>
Also note that signal handling is done asynchronously: when emitted in the worker thread, it will be "queued" to be processed in the user thread when it has the chance (when gda.thread_wrapper.ThreadWrapper.iterate is called directly or indirectly). The side effect is that the callback function is usually called long after the object emitting the signal has finished emitting it.
To disconnect a signal handler, don't use any of the g_signal_handler_*() functions but the gda.thread_wrapper.ThreadWrapper.disconnect method.