aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl/native
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2014-09-22 23:17:28 +0200
committerSven Gothel <[email protected]>2014-09-22 23:17:28 +0200
commitcef7ba607ad7e8eb1ff2a438d77710a29aa0bda6 (patch)
tree3023dbb624f261047d99ac6bc034eec781a89d7a /src/jogl/native
parentf9acc8f7b9072b8c12cdc16dee657349180e6bf0 (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/jogl/native')
0 files changed, 0 insertions, 0 deletions