Skip to main content

Function: runInCallerContext()

function runInCallerContext<T>(callerContext: CallerContext, fn: () => T): T;

Run a function with an immutable snapshot of the caller context. Nested and concurrent scopes keep their own identities.

Type Parameters

Type Parameter
T

Parameters

ParameterTypeDescription
callerContextCallerContextThe caller context to use
fn() => TThe function to run

Returns

T

The result of the function

Databricks Developer Hub

Ready to ship your next agentic app in minutes?

Read docs