I need help with three threads in Android
One thread is the main thread, the other is GLThread, and the other is WorkerThread, which I created to update the state of the game.
The problem I have is all that is needed to access the same LinkedList of game objects. Both GLThread and my WorkerThread are read only from LinkedList, so there is no problem, but sometimes I have a main thread adding a list to another game object.
How can i do this? I tried using synchronization before functions, but it really slows down the application.
For some reason, just catching errors, rather than rendering or updating the state of the game, that frame, makes it constantly linger.
Anyone have any great ideas?
source
share