summaryrefslogtreecommitdiff
path: root/libs/rs/rsg_ScriptJavaClass.cpp
diff options
context:
space:
mode:
authorJack Palevich <jackpal@google.com>2009-11-06 10:21:46 +0800
committerJack Palevich <jackpal@google.com>2009-11-06 10:21:46 +0800
commit8b2c9c9ecb08d25244fa97fb42c2c315ae3cf03d (patch)
tree0267829c2e976a2b97f3eefa4a03ee47f9f06f6c /libs/rs/rsg_ScriptJavaClass.cpp
parentbfa68abc955ed1fe6cf6d98e42f344a8d623fab7 (diff)
Improve GLSurfaceView to avoid deadlocks and race conditions.
This is work towards fixing bug 2228262 Specific issues fixed by this change: + GLThread names now include the thread id, making it easier to tell one GLThread from another. + A private final static boolean LOG_THREADS can be set to true at compile time to print out thread-related trace information, helpful for debugging GLSurfaceView behavior. This static defaults to "false". + Changed calls to "notify" to "notifyAll" to make the code more robust in case more than two threads are blocked on the same monitor. + Add a GLThreadManager to help manage the transition to a new GLThread. Currently only one GLThread can be active in an address space. When the second thread starts up, the GLThreadManager helps the old GLThread to shut down, + Make sure we stop waiting for dead GLThreads. This is done by adding checks for a variable mDone being true to our monitor wait loops. And we use a "finally" clause at the end of GLThread.run() method to set mDone and notifyAll any wait loops.
Diffstat (limited to 'libs/rs/rsg_ScriptJavaClass.cpp')
0 files changed, 0 insertions, 0 deletions