Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 12 for Janitor (0.15 sec)

  1. android/guava/src/com/google/common/util/concurrent/Monitor.java

        @Weak final Monitor monitor;
        final Condition condition;
    
        @GuardedBy("monitor.lock")
        int waiterCount = 0;
    
        /** The next active guard */
        @GuardedBy("monitor.lock")
        @CheckForNull
        Guard next;
    
        protected Guard(Monitor monitor) {
          this.monitor = checkNotNull(monitor, "monitor");
          this.condition = monitor.lock.newCondition();
        }
    
        /**
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Dec 04 18:22:01 GMT 2023
    - 38.6K bytes
    - Viewed (0)
  2. android/guava-tests/test/com/google/common/util/concurrent/TestThread.java

       */
      public void callAndAssertWaits(String methodName, Object conditionLikeObject) throws Exception {
        checkNotNull(methodName);
        checkNotNull(conditionLikeObject);
        // TODO: Restore the following line when Monitor.hasWaiters() no longer acquires the lock.
        // assertEquals(false, invokeMethod("hasWaiters", conditionLikeObject));
        sendRequest(methodName, conditionLikeObject);
        Thread.sleep(DUE_DILIGENCE_MILLIS);
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Apr 26 20:07:17 GMT 2023
    - 10.9K bytes
    - Viewed (0)
  3. guava-tests/test/com/google/common/util/concurrent/GeneratedMonitorTest.java

            }
          }
        }
      }
    
      /** A guard that encapsulates a simple, mutable boolean flag. */
      static class FlagGuard extends Monitor.Guard {
    
        private boolean satisfied;
    
        protected FlagGuard(Monitor monitor) {
          super(monitor);
        }
    
        @Override
        public boolean isSatisfied() {
          return satisfied;
        }
    
        public void setSatisfied(boolean satisfied) {
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Mon Apr 17 14:48:57 GMT 2023
    - 27.4K bytes
    - Viewed (0)
  4. android/guava-tests/benchmark/com/google/common/util/concurrent/MonitorBasedArrayBlockingQueue.java

        if (e == null) throw new NullPointerException();
        final Monitor monitor = this.monitor;
        monitor.enterWhen(notFull);
        try {
          insert(e);
        } finally {
          monitor.leave();
        }
      }
    
      @CanIgnoreReturnValue
      @Override
      public @Nullable E poll() {
        final Monitor monitor = this.monitor;
        if (monitor.enterIf(notEmpty)) {
          try {
            return extract();
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Apr 19 19:24:36 GMT 2023
    - 22.5K bytes
    - Viewed (0)
  5. guava-tests/test/com/google/common/util/concurrent/TestThread.java

       */
      public void callAndAssertWaits(String methodName, Object conditionLikeObject) throws Exception {
        checkNotNull(methodName);
        checkNotNull(conditionLikeObject);
        // TODO: Restore the following line when Monitor.hasWaiters() no longer acquires the lock.
        // assertEquals(false, invokeMethod("hasWaiters", conditionLikeObject));
        sendRequest(methodName, conditionLikeObject);
        Thread.sleep(DUE_DILIGENCE_MILLIS);
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Wed Apr 26 20:07:17 GMT 2023
    - 10.9K bytes
    - Viewed (0)
  6. android/guava-tests/test/com/google/common/util/concurrent/GeneratedMonitorTest.java

          @Override
          protected void runTest() throws Throwable {
            Monitor monitor = new Monitor(fair);
            FlagGuard guard = new FlagGuard(monitor);
            Object[] arguments =
                (timed ? new Object[] {guard, 0L, TimeUnit.MILLISECONDS} : new Object[] {guard});
            try {
              method.invoke(monitor, arguments);
              fail("expected IllegalMonitorStateException");
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Apr 17 14:48:57 GMT 2023
    - 26.1K bytes
    - Viewed (0)
  7. android/guava/src/com/google/common/util/concurrent/AbstractService.java

            return "stopping({from = " + from + "})";
          }
        };
      }
    
      private final Monitor monitor = new Monitor();
    
      private final Guard isStartable = new IsStartableGuard();
    
      @WeakOuter
      private final class IsStartableGuard extends Guard {
        IsStartableGuard() {
          super(AbstractService.this.monitor);
        }
    
        @Override
        public boolean isSatisfied() {
          return state() == NEW;
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Fri May 12 18:32:03 GMT 2023
    - 20.4K bytes
    - Viewed (0)
  8. android/guava/src/com/google/common/util/concurrent/AbstractScheduledService.java

              // because the service does not monitor the state of the future so if the exception is not
              // caught and forwarded to the service the task would stop executing but the service would
              // have no idea.
              // TODO(lukes): consider building everything in terms of ListenableScheduledFuture then
              // the AbstractService could monitor the future directly. Rescheduling is still hard...
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Dec 13 19:45:20 GMT 2023
    - 25.8K bytes
    - Viewed (0)
  9. guava-tests/benchmark/com/google/common/util/concurrent/MonitorBasedArrayBlockingQueue.java

        if (e == null) throw new NullPointerException();
        final Monitor monitor = this.monitor;
        monitor.enterWhen(notFull);
        try {
          insert(e);
        } finally {
          monitor.leave();
        }
      }
    
      @CanIgnoreReturnValue
      @Override
      public @Nullable E poll() {
        final Monitor monitor = this.monitor;
        if (monitor.enterIf(notEmpty)) {
          try {
            return extract();
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Apr 19 19:24:36 GMT 2023
    - 22.5K bytes
    - Viewed (0)
  10. guava-tests/benchmark/com/google/common/util/concurrent/MonitorBasedPriorityBlockingQueue.java

      @Override
      public <T> T[] toArray(T[] a) {
        final Monitor monitor = this.monitor;
        monitor.enter();
        try {
          return q.toArray(a);
        } finally {
          monitor.leave();
        }
      }
    
      @CanIgnoreReturnValue // pushed down from class to method
      @Override
      public String toString() {
        final Monitor monitor = this.monitor;
        monitor.enter();
        try {
          return q.toString();
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Apr 19 19:24:36 GMT 2023
    - 19.5K bytes
    - Viewed (0)
Back to top