Class NonBlocking

  • All Implemented Interfaces:
    AutoCloseable

    public class NonBlocking
    extends Object
    implements AutoCloseable
    NonBlocking allows a thread to mark itself as non-blocking and should be exempt from things such as flow-control pauses using a try-with-resource pattern.
     try (NonBlocking e = new NonBlocking())
         {
         // NonBlocking.isNonBlockingCaller() will now be true, and FlowControlled elements should respect this and not block
         }
     // NonBlocking.isNonBlockingCaller() will have been restored to its former value
     
    • Constructor Detail

      • NonBlocking

        public NonBlocking()
    • Method Detail

      • isNonBlockingCaller

        public static boolean isNonBlockingCaller()
        Return true if the the calling thread has been marked as non-blocking
        Returns:
        true iff the calling thread is marked as non-blocking