add_idle


Description:

public weak TimeoutSource add_idle (MainContext? async_context, SourceFunc function)

Adds an idle event as with g_idle_add, but using the given async_context.

If you want function to run "right away", use add_completion, since that sets a higher priority on the SocketSource than add_idle does.

Parameters:

async_context

the MainContext to dispatch the I/O watch in, or null for the default context

function

the callback to invoke at idle time

data

user data to pass to function

Returns:

a SocketSource, which can be removed from async_context with destroy.


Namespace: Soup
Package: libsoup-2.4