initCoroutineScope

open suspend override fun initCoroutineScope(coroutineScope: CoroutineScope?): CoroutineScope

Initialize a new CoroutineScope which can hold ApplicationContext for all coroutines that use this scope.

This is inheritable meaning if passed coroutineScope is already initialized with this ThreadLocal then that coroutineScope is not changed and returned as is.

Return

Parameters

coroutineScope

if any existing coroutineScope passed then a new coroutineScope is created from that param and init for holding ApplicationContext