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?
Thanks 
 

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 
https://groups.google.com/d/msgid/codenameone-discussions/7738b8b5-3d6e-415a-8664-90d730376a70%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to