![]() |
#1 |
Junior Member
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8
Karma: 962
Join Date: Dec 2012
Device: Kindle paperwhite, Kobo Mini
|
ConcurrentHashMap
Hi,
In an earlier post [https://www.mobileread.com/forums/sho...eventlistener] I outlined that I ma using a nmea library in my kindle PW. After fixing the build issues in the earlier post, I discovered that the kindle doesnt like: Code:
private static final Logger LOGGER = Logger.getLogger(SentenceReader.class.getName()); Code:
private ConcurrentMap<String, List<SentenceListener>> listeners = new ConcurrentHashMap<String, List<SentenceListener>>(); however for the ConcurrentHashMap I am not sure what to use instead and was hoping for some advice here. The project builds fine but the kindlet gets stuck/ freezes at this method. thanks Nubble ![]() |
![]() |
![]() |
![]() |
#2 |
Enthusiast
![]() Posts: 28
Karma: 13
Join Date: Apr 2014
Device: Kindle PW
|
Have you tried using the ConcurrentSkipListMap? If it doesn't work you could just implement the ConcurrentMap interface by using a HashMap with synchronized wrapper methods.
|
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Junior Member
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8
Karma: 962
Join Date: Dec 2012
Device: Kindle paperwhite, Kobo Mini
|
Thx bulsa.
I'll give it a shot. |
![]() |
![]() |