rrva
05/05/2022, 3:43 PMsuspend fun refreshToken(token: Token)
if the cache is cold, I want to prevent coroutines concurrently refreshing the value
I have tried some solutions
Semaphore (the coroutine aware one)
Actor-like impl with channels but without actor lib.
Are there any other simpler/more obvious solutions?rrva
05/05/2022, 3:47 PMrrva
05/05/2022, 3:47 PM