Package org.jcsp.net2

Class Mutex

java.lang.Object
org.jcsp.net2.Mutex

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

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

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    (package private) void
    Claims the mutex for exclusive access
    (package private) void
    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 Details

    • claimed

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

    • Mutex

      Mutex()
  • Method Details

    • claim

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

      void release()
      Releases the mutex for exclusive access