android-components / mozilla.components.support.ktx.android.os / android.os.StrictMode.ThreadPolicy / resetAfter

resetAfter

inline fun <R> ThreadPolicy.resetAfter(functionBlock: () -> R): R (source)

Runs the given functionBlock and sets the ThreadPolicy after its completion.

This function is written in the style of AutoCloseable.use.

Return
the value returned by functionBlock.