so then so how can I change my `MusicStore` object...
# announcements
k
so then so how can I change my
MusicStore
object to make it safe from errors/race conditions ? do I need to change type of
lists
a
A quick fix would be to wrap the body of the loadAllSongs function in a
return synchronized(songsMap) { ... }
block
k
what type of values are not good to keep in
object
and why ?