I have a controller class that runs on thread A and compiles a list of local variables like this
Theme A
list = new ArrayList<Map<String, Order>>(); list.add(...); list.add(...);
where Order is a java bean with several primitive properties such as String, int, long, etc.
After creating this list, its link is passed to the user interface thread (thread B) Activity and access to it. Communication between threads is performed using the Handler class + post () method.
So the question is, can I access the list data from stream B without synchronization at all? Note that after creating in stream A, the list will not be accessible / modified at all. It just exists as a local variable and then passed to stream B.
source share