This might be slightly offtopic, but how do you un...
# coroutines
u
This might be slightly offtopic, but how do you unit test concurrent code? If I just let loose two threads at a function, im not guaranteed contention will happen, right?
z
Take a look at the stress tests in the coroutines repo. Typically involves iterating a lot to try to increase the chance of contention happening.
👍 1
u
Thanks! But just to clarify, its just a best effort, right? i.e. its impossible to do 100% sure?
z
AFAIK, yes