This content has been marked as final.
Show 3 replies
-
1. Re: MemoryMetaDataLoader not threadsafe?
alesj Nov 20, 2009 11:49 AM (in response to kabirkhan)Even putIfAbsent doesn't completely solve your problem.
e.g. what if something just adds something while you're doing the merge?
Or is that what you meant by "For simple values this will probably be fine"?
But then the first one wins. :-) -
2. Re: MemoryMetaDataLoader not threadsafe?
kabirkhan Nov 20, 2009 11:55 AM (in response to kabirkhan)So how are you going to fix it? :-)
-
3. Re: MemoryMetaDataLoader not threadsafe?
kabirkhan Nov 20, 2009 11:56 AM (in response to kabirkhan)Or rather if putIfAbsent() was there, it would be a user error if not used when contention could occur.