Timeline for Algorithm to create custom ConcurrentHashMap?
Current License: CC BY-SA 3.0
6 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Oct 29, 2014 at 11:39 | comment | added | kdgregory | In that case your point #3 is poorly described rather than being completely wrong. I suppose a list of locked buckets (and consequent linear search) would work. The JDK implementation, however, locks segments of the table -- a range of buckets. This is rather more efficient, as it can be done with simple math. | |
Oct 29, 2014 at 3:28 | comment | added | M Sach | @kdgregory i know bucket is being lockeg here. I also know how hash-table works here. My proposed solution handles exactly how lock object could control multiple concurrent updates. | |
Oct 28, 2014 at 11:59 | comment | added | kdgregory | You're missing the most important part: what is being locked. Start with how a hash-table works (it's unclear whether you know that from your post). Then think about how multiple concurrent updates to that table could be managed, and how locks might control those updates. Extra credit: how can reads proceed at the same time as writes. | |
Oct 28, 2014 at 11:13 | answer | added | Random42 | timeline score: 1 | |
Oct 28, 2014 at 11:01 | review | First posts | |||
Oct 28, 2014 at 11:11 | |||||
Oct 28, 2014 at 11:01 | history | asked | M Sach | CC BY-SA 3.0 |