execute

@InternalKmpTorApi
open override fun execute(handler: CoroutineContext, executable: Executable)(source)

Execute executable in desired context.

NOTE: This is an internal API and should not be called from general code; it is strictly for kmp-tor event observers. Custom implementations of Executor should be for usage with kmp-tor only, and not invoke execute

The UncaughtException.Handler can be retrieved from CoroutineContext by UncaughtException.Handler.uncaughtExceptionHandlerOrNull if needed.

Parameters

handler

The UncaughtException.Handler wrapped as CoroutineContext element to pipe exceptions.

executable

to be invoked in desired context.