Creates a #GPollFD corresponding to cancellable; this can be passed
to glib.global.poll and used to poll for cancellation. This is useful both
for unix systems without a native poll and for portability to
windows.
If this function returns false, either no cancellable was given or
resource limits prevent this function from allocating the necessary
structures for polling. (On Linux, you will likely have reached
the maximum number of file descriptors.) The suggested way to handle
these cases is to ignore the cancellable.
You are not supposed to read from the fd yourself, just check for
readable status. Reading to unset the readable status is done
with gio.cancellable.Cancellable.reset.
Creates a #GPollFD corresponding to cancellable; this can be passed to glib.global.poll and used to poll for cancellation. This is useful both for unix systems without a native poll and for portability to windows.
When this function returns true, you should use gio.cancellable.Cancellable.releaseFd to free up resources allocated for the pollfd. After a false return, do not call gio.cancellable.Cancellable.releaseFd.
If this function returns false, either no cancellable was given or resource limits prevent this function from allocating the necessary structures for polling. (On Linux, you will likely have reached the maximum number of file descriptors.) The suggested way to handle these cases is to ignore the cancellable.
You are not supposed to read from the fd yourself, just check for readable status. Reading to unset the readable status is done with gio.cancellable.Cancellable.reset.