diff options
author | Sven Gothel <[email protected]> | 2014-09-22 23:17:28 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2014-09-22 23:23:42 +0200 |
commit | b13f4efae1ad14117efef6a3bd5eee47aaa98cdf (patch) | |
tree | 2ffd139255cc3d74e7205cae2c7d50378d01f153 /src/test-native/mesa-demos-patched/loop.sh | |
parent | 657081451f7cceac0b0a58b3c15a10a6d3b4b907 (diff) |
Fix synchronization issues in GLDrawableHelper.flushGLRunnables(), fixes rare deadlock with animator-exception and invoke(wait=true, ..)
Fix synchronization issues in GLDrawableHelper.flushGLRunnables():
- Querying 'glRunnables.size()' is not synchronized, only its reference is volatile,
not the instance's own states.
- 'flushGLRunnable()' must operates while acquired the 'glRunnable' lock.
- 'glRunnables' are no more volatile
- introduced volatile 'glRunnableCount', allowing 'display(..)' method
to pre-query whether blocking 'execGLRunnables(..)' must be called.
This is risk (deadlock) free.
Also fixes rare deadlock in animator display-exception / GLAD.invoke(wait=true, ..) case:
- 'GLDrawableHelper.invoke(.., GLRunnable)' acquires the 'glRunnable' lock.
- Then it queries animator state, which is blocking.
- Hence animator's 'flushGLRunnable()' call must happen outside the animator lock
Diffstat (limited to 'src/test-native/mesa-demos-patched/loop.sh')
0 files changed, 0 insertions, 0 deletions