Mikołaj Kąkol
03/19/2020, 7:14 AMscope called bigScope how can I create a scope smallScope that will be canceled when bigScope is cancelled?octylFractal
03/19/2020, 7:15 AMCoroutineScope(Job(bigScope.coroutineContext[Job]))?Mikołaj Kąkol
03/19/2020, 7:18 AMval smallScope = CoroutineScope(Dispatchers.Main + bigScope.coroutineContext)
like that?Mikołaj Kąkol
03/19/2020, 7:18 AMMikołaj Kąkol
03/19/2020, 7:19 AMval smallScope = CoroutineScope(Dispatchers.Main + Job(bigScope.coroutineContext[Job]))
compiles too, could you point a difference?octylFractal
03/19/2020, 7:19 AMJob(parent: Job) constructor means structured concurrencyoctylFractal
03/19/2020, 7:19 AMsmallScope is a child of bigScopeoctylFractal
03/19/2020, 7:20 AMbigScopeMikołaj Kąkol
03/19/2020, 7:20 AM