hey, is it possible to provide my dispatcher to the root composition that is used on
rememberCoroutineScope()
?
d
dorche
04/01/2025, 12:32 PM
Could you not just create a wrapper function
myRememberCoroutineScope()
that passes your dispatcher to the context of
rememberCoroutineScope()
(I assume the whole point of this question is that you don't want to specify the dispatcher every time) ?
j
juliocbcotta
04/01/2025, 12:40 PM
I wanted to provide my dispatcher to try a better synchronization with Instrumented tests on Android (where I would integrate the Dispatcher with IdleResources)...
How can I create this
myRememberCoroutineScope
? This could help, but all the places where libraries are using
rememberCoroutineScope
would not be integrated...
d
dorche
04/01/2025, 1:12 PM
Yeah it would only help for your own code where you can actually replace the calls
z
Zach Klippenstein (he/him) [MOD]
04/01/2025, 4:47 PM
runComposeUiTest accepts a context, you can pass a dispatcher in there.