Package ghidra.util
Class Lock
- java.lang.Object
-
- ghidra.util.Lock
-
public class Lock extends java.lang.Object
Ghidra synchronization lock. This class allows creation of named locks for synchroniing modification of multiple tables in the Ghidra database.
-
-
Constructor Summary
Constructors Constructor Description Lock(java.lang.String name)
Creates an instance of a lock for synchronization within Ghidra.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
acquire()
Acquire this synchronization lock.java.lang.Thread
getOwner()
Gets the thread that currently owns the lock.void
release()
Releases this lock, since you are through with the code that needed synchronization.
-
-
-
Method Detail
-
acquire
public void acquire()
Acquire this synchronization lock. (i.e. begin synchronizing on this named lock.)
-
release
public void release()
Releases this lock, since you are through with the code that needed synchronization.
-
getOwner
public java.lang.Thread getOwner()
Gets the thread that currently owns the lock.- Returns:
- the thread that owns the lock or null.
-
-