Execute the provide callback function (with the given arguments) in a protected context which is run in another thread (optionally with a requested stack size).

Synopsis

Declared in <llvm/Support/CrashRecoveryContext.h>

bool
RunSafelyOnThread(
    function_ref<void()> Fn,
    unsigned int RequestedStackSize = 0);

Description

See RunSafely().

On Darwin, if PRIO_DARWIN_BG is set on the calling thread, it will be propagated to the new thread as well.

Return Value

True if the function completed successfully, and false if the function crashed.

Parameters

Name

Description

Fn

Callback to run under crash recovery on another thread.

RequestedStackSize

Preferred stack size for the new thread, or zero to use the default.

Created with MrDocs