import threading = require('./threading'); import ClassData = require('./ClassData'); /** * A single class lock, used for load/initialization locks. */ declare class ClassLock { private queue; /** * Checks if the lock is taken. If so, it enqueues the callback. Otherwise, * it takes the lock and returns true. */ tryLock(thread: threading.JVMThread, cb: (cdata: ClassData.ClassData) => void): boolean; /** * Releases the lock on the class, and passes the object to all enqueued * callbacks. */ unlock(cdata: ClassData.ClassData): void; /** * Get the owner of this lock. */ getOwner(): threading.JVMThread; } export = ClassLock;