Gio.pollable_source_new
function pollable_source_new(pollable_stream: GObject.Object): GLib.Source { // Gjs wrapper for g_pollable_source_new() }
Utility method for Gio.PollableInputStream and Gio.PollableOutputStream implementations. Creates a new GLib.Source that expects a callback of type Gio.PollableSourceFunc. The new source does not actually do anything on its own; use GLib.Source.prototype.add_child_source to add other sources to it to cause it to trigger.
Since 2.28
- pollable_stream
the stream associated with the new source
- Returns
the new GLib.Source.