Package ghidra.util

Class Lock


  • public class Lock
    extends java.lang.Object
    Ghidra synchronization lock. This class allows creation of named locks for modifying tables in the Ghidra data base. This class also creates an instance of a global lock that must first be obtained when synchronizing using multiple of the named locks.
    • 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.
      • Methods inherited from class java.lang.Object

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

      • Lock

        public Lock​(java.lang.String name)
        Creates an instance of a lock for synchronization within Ghidra.
        Parameters:
        name - the name of this lock
    • 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.