Empty Synchronized method in game loop
- by Shijima
I am studying the gameloop used in Replica Island to understand a bit about Android game development. The main loop has the below logic...
GameThread.java (note the variable names in sample code dont match exact source code)
while (!finished) {
if (objectManager != null) {
renderer.waitDrawingComplete();
//Do more gameloop stuff after drawing is complete...
}
}
I was curious to see what waitDrawingComplete actually does, but found its just an empty syncrhonized method! I guess it does nothing, am I missing something here?
GameRenderer.java line 328
public synchronized void waitDrawingComplete() {
}
Source code can be checked out here with SVN if you feel like having a look: https://code.google.com/p/replicaisland/source/checkout