Connects a callback function to a signal for a particular object.
The difference with connect and similar functions are:
callback
argument is not a ObjectConstructorFunc function, so the callback signature is
not dependent on the signal itselfcallback
function will be called asynchronously, the caller may need to use
iterate to get the notificationprivate_job
and private_thread
control in which case the signal is propagated.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 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 disconnect method.
this |
a ThreadWrapper object |
instance |
the instance to connect to |
sig_name |
a string of the form "signal-name::detail" |
private_thread |
set to |
private_job |
set to |
callback |
a ThreadWrapperCallback function |
data |
data to pass to |
the handler ID |