Shared_state_and_concurrency
# coroutines
u
Shared_state_and_concurrency
e
a post is not a text snippet - Slack has hidden that away under "Browse all shortcuts" unfortunately. but anyhow…
it is not safe to read from a map that is being updated concurrently
u
do you mean that I should update getMethod or the whole paradigm (switching to actors, for instance)?
e
get() should also be synchronized on the same mutex
either that or use a different structure which is safe to access concurrently (Java has ConcurrentMap for example, but an actor publishing a whole new map on each update is also a possibility)
👍 1