They can expect concurrency just fine. They should not expect parallelism
j
Jacob
07/10/2023, 7:45 PM
no. the second scope won't get created until the first scope finishes
k
kevin.cianfarini
07/10/2023, 8:04 PM
Oh whoops right I thought it was launching into two separate scopes by accident
c
CLOVIS
07/10/2023, 9:26 PM
You can never guarantee that two functions will run exactly at the same time. Even if you manage to start them in two threads exactly at the same time, there are more threads than CPU cores, and the JVM, the kernel, and your CPU itself can pause anything anytime they want and delay for however long they want.
g
galex
07/11/2023, 3:03 AM
Yes, you're right 😉
The use case is to update Compose UI Components at the same time, and I did it with a coroutine per each. which is useless because they need to update at the same time anyway
So I've changed it and made one Ticker that changes its state on each tick so each component can now
remember(ticker)
and do stuff at the same time.
Thank you all for your help!