call_sync


Description:

public Response call_sync (Request request) throws Error

Blocking call that does not iterate the default GLib.MainContext.

Attaches a per-frame read watch (and call timeout) to a private sync_context and runs only that loop until this request completes. Does not GLib.MainContext.push_thread_default — that would steal Clutter/GJS idles onto the private context and drop them on teardown. Sends with a blocking flush so send_head is not required mid-call. Socket / TCP only.

While an outer wait is open, a nested call_sync (e.g. Live.Invoke handler → RPC-Live-Callback.reply or a child GI request) reuses the same private context with its own IO watch and GLib.MainLoop; it must not iterate the default context. Handlers run on that private context.

Parameters:

request

wire request; Request.id is set here

Returns:

wire response on success

Exceptions:

GLib.Error

same as call