invoke


Description:

protected virtual bool invoke (MainContext caller_context, owned SourceFunc callback)

Invoke a callback on the context that started the local call.

The worker waits until the callback has run so streaming state and UI notifications advance one token at a time on the caller thread.

Parameters:

caller_context

context that receives the callback

callback

callback to run on the caller context

Returns:

value returned by the callback