Package ghidra.util

Class Lock

java.lang.Object
ghidra.util.Lock

public class Lock extends Object
Ghidra synchronization lock. This class allows creation of named locks for synchronizing modification of multiple tables in the Ghidra database.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Lock(String name)
    Creates an instance of a lock for synchronization within Ghidra.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Acquire this synchronization lock.
    Gets the thread that currently owns the lock.
    void
    Releases this lock, since you are through with the code that needed synchronization.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • Lock

      public Lock(String name)
      Creates an instance of a lock for synchronization within Ghidra.
      Parameters:
      name - the name of this lock
  • Method Details

    • 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 Thread getOwner()
      Gets the thread that currently owns the lock.
      Returns:
      the thread that owns the lock or null.