Timeline for Using CountDownLatch for blocking the reads if writes are happening
Current License: CC BY-SA 3.0
11 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Sep 2, 2014 at 16:35 | vote | accept | arsenal | ||
Jun 4, 2014 at 23:22 | answer | added | rolfl | timeline score: 4 | |
May 11, 2014 at 9:39 | history | tweeted | twitter.com/#!/StackCodeReview/status/465426082145906688 | ||
Apr 30, 2014 at 3:15 | comment | added | arsenal | @DavidHarkness: Thanks for another tip. I added that change as well. Let's see if I can get any other suggestion. | |
Apr 29, 2014 at 22:32 | comment | added | David Harkness |
If you don't need insertion-order traversal you can use HashMap instead of LinkedHashMap to save some memory. ConcurrentHashMap didn't provide this feature, so I doubt you're depending on it.
|
|
Apr 29, 2014 at 22:24 | comment | added | arsenal | Yeah. good point. I will replace that with LinkedHashMap then. | |
Apr 29, 2014 at 22:18 | comment | added | David Harkness | Correct. If those maps created in a single background thread, there's no need for a concurrent map. | |
Apr 29, 2014 at 22:14 | comment | added | arsenal |
@DavidHarkness: You talking about inside TempScheduler class? Right?
|
|
Apr 29, 2014 at 22:00 | comment | added | David Harkness |
I had assumed in your previous question that the maps couldn't be modified once set. If that's the case, there's no need for ConcurrentHashMap here since they are written by a single thread and safely published before being read.
|
|
Apr 29, 2014 at 21:47 | history | edited | Jamal | CC BY-SA 3.0 |
added 670 characters in body; edited title; edited tags
|
Apr 29, 2014 at 21:39 | history | asked | arsenal | CC BY-SA 3.0 |