Join Slack
Powered by
is it possible to solve exactly this issue with co...
# coroutines
d
deviant
11/26/2019, 2:54 PM
is it possible to solve exactly this issue with coroutines in elegant way?
https://stackoverflow.com/questions/12450402/java-synchronizing-based-on-a-parameter-named-mutex-lock
a
alllex
11/27/2019, 10:39 AM
You can try storing `Mutex`es (which is a non-blocking version of locks) in a map as well. But maybe make sure you use an appropriate
ConcurrentHashMap
to store them and get them via thread-safe
computeIfAbsent
to create new mutexes.
2
Views
Open in Slack
Previous
Next