com.sun.opengl.impl
Class GLContextLock

java.lang.Object
  extended by com.sun.opengl.impl.GLContextLock

public class GLContextLock
extends java.lang.Object

Implements the makeCurrent / release locking behavior of the GLContext class. When "fail fast mode" is enabled, attempts to lock the same GLContextLock on more than one thread cause GLException to be raised. This lock is not recursive. Attempts to lock it more than once on a given thread will cause GLException to be raised.


Constructor Summary
GLContextLock()
           
 
Method Summary
 boolean getFailFastMode()
           
 boolean hasWaiters()
           
 boolean isHeld()
          Indicates whether this lock is held by the current thread.
 void lock()
          Locks this GLContextLock on the current thread.
 void setFailFastMode(boolean onOrOff)
           
 void unlock()
          Unlocks this GLContextLock.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GLContextLock

public GLContextLock()
Method Detail

lock

public void lock()
          throws GLException
Locks this GLContextLock on the current thread. If fail fast mode is enabled and the GLContextLock is already owned by another thread, throws GLException.

Throws:
GLException

unlock

public void unlock()
            throws GLException
Unlocks this GLContextLock.

Throws:
GLException

isHeld

public boolean isHeld()
Indicates whether this lock is held by the current thread.


setFailFastMode

public void setFailFastMode(boolean onOrOff)

getFailFastMode

public boolean getFailFastMode()

hasWaiters

public boolean hasWaiters()


Copyright 2005 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.