I have some threads that perform networker requests and then create ui 
elements based on the results of these request. 
These elements (markers) are then added to a map. But at this point the app 
sometimes crash with a ConcurrentModificationException. 
The function in my threads that is called to add elements (markers) to the 
map is inside a 
Display.getInstance().callSerially(new Runnable() {

block. I thought it was how we are supposed to "resync" results of some 
threads with the EDT one but it doesn't seem to work as I expected as the 
MapLayout is sometimes returning a ConcurrentModificationException when 
performing the layout (probably because some threads are adding markers 
components when the EDT is trying to perform the layout)
So how can I safelly add components to a container (a map) from multiple 
non EDT threads?

Device: android

You received this message because you are subscribed to the Google Groups 
"CodenameOne Discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to codenameone-discussions+unsubscr...@googlegroups.com.
Visit this group at https://groups.google.com/group/codenameone-discussions.
To view this discussion on the web visit 
For more options, visit https://groups.google.com/d/optout.

Reply via email to