Package org.jcsp.net2

Class Mutex


  • class Mutex
    extends java.lang.Object
    A package-visible class that implements a straightforward mutex, for use by Net2AnyChannel
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private boolean claimed
      Flag to mark the mutex as claimed
    • Constructor Summary

      Constructors 
      Constructor Description
      Mutex()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      (package private) void claim()
      Claims the mutex for exclusive access
      (package private) void release()
      Releases the mutex for exclusive access
      • Methods inherited from class java.lang.Object

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

      • claimed

        private boolean claimed
        Flag to mark the mutex as claimed
    • Constructor Detail

      • Mutex

        Mutex()
    • Method Detail

      • claim

        void claim()
        Claims the mutex for exclusive access
      • release

        void release()
        Releases the mutex for exclusive access