AWTUtil.lockToolkit

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

AWTUtil.lockToolkit

Christophe LAFOLET
This post was updated on .
I'm using JOGL 2.3.2 with Swing/AWT ( property sun.java2d.opengl=true )

I have several threads which call simultaneously Java2D.invokeWithOGLSharedContextCurrent() or Java2D.invokeWithOGLContextCurrent().

The first thread set AWTUtil.lockedToolkit to true
The others threads get a GLException "Toolkit already locked"

In my context, SunToolkit.awtLock() is called
So, why do we need the static AWTUtil.lockedToolkit ?

Reply | Threaded
Open this post in threaded view
|

Re: AWTUtil.lockToolkit

gouessej
Administrator
Sorry for the late reply. Several threads shouldn't call that simultaneously. Have you tried to use invokeAndWait?
Julien Gouesse | Personal blog | Website