Package: gio

Function gio:cancellable-disconnect

Lambda List

gio:cancellable-disconnect (cancellable id)

Arguments

cancellable -- a g:cancellable object
id -- an unsigned integer for the handler ID of the handler to be disconnected, or 0

Details

Disconnects a handler from a cancellable instance similar to the g:signal-handler-disconnect function. Additionally, in the event that a signal handler is currently running, this call will block until the handler has finished. Calling this function from a "cancelled" signal handler will therefore result in a deadlock.

This avoids a race condition where a thread cancels at the same time as the cancellable operation is finished and the signal handler is removed. See the "cancelled" signal handler for details on how to use this.

If cancellable is nil or ID is 0 this function does nothing.
 

See also

2025-05-27