Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 43 for Guyard (0.2 sec)

  1. guava-tests/test/com/google/common/util/concurrent/MonitorTestCase.java

        TestGuard guard = new TestGuard(true);
        thread1.callAndAssertReturns(true, enterIf(), guard);
        thread2.callAndAssertBlocks(enter());
      }
    
      public final void testEnterIf_initiallyFalse() throws Exception {
        TestGuard guard = new TestGuard(false);
        thread1.callAndAssertReturns(false, enterIf(), guard);
        thread2.callAndAssertReturns(enter());
      }
    
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Wed Apr 26 20:07:17 GMT 2023
    - 8K bytes
    - Viewed (0)
  2. guava-tests/test/com/google/common/util/concurrent/GeneratedMonitorTest.java

        // (b) Waiting for the single guard to become satisfied.
        // (c) Occupying the monitor and awaiting the tearDownLatch.
        //
        // Except for (c), every thread should occupy the monitor very briefly, and every thread leaves
        // the monitor with the guard satisfied. Therefore as soon as tearDownLatch is triggered, we
        // should be able to enter the monitor, and then we set the guard to satisfied for the benefit
    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)
  3. android/guava/src/com/google/common/util/concurrent/Monitor.java

        for (Guard guard = activeGuards; guard != null; guard = guard.next) {
          guard.condition.signalAll();
        }
      }
    
      /** Records that the current thread is about to wait on the specified guard. */
      @GuardedBy("lock")
      private void beginWaitingFor(Guard guard) {
        int waiters = guard.waiterCount++;
        if (waiters == 0) {
          // push guard onto activeGuards
          guard.next = activeGuards;
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Mon Dec 04 18:22:01 GMT 2023
    - 38.6K bytes
    - Viewed (0)
  4. android/guava-tests/test/com/google/common/util/concurrent/MonitorTestCase.java

      public final void testEnterWhen_initiallyTrue() throws Exception {
        TestGuard guard = new TestGuard(true);
        thread1.callAndAssertReturns(enterWhen(), guard);
      }
    
      public final void testEnterWhen_initiallyFalse() throws Exception {
        TestGuard guard = new TestGuard(false);
        thread1.callAndAssertWaits(enterWhen(), guard);
        monitor.enter();
        guard.setSatisfied(true);
        monitor.leave();
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Apr 26 20:07:17 GMT 2023
    - 7.9K bytes
    - Viewed (0)
  5. android/guava-tests/test/com/google/common/util/concurrent/GeneratedMonitorTest.java

            Monitor monitor2 = new Monitor(fair2);
            FlagGuard guard = new FlagGuard(monitor2);
            Object[] arguments =
                (timed ? new Object[] {guard, 0L, TimeUnit.MILLISECONDS} : new Object[] {guard});
            boolean occupyMonitor = isWaitFor(method);
            if (occupyMonitor) {
              // If we don't already occupy the monitor, we'll get an IMSE regardless of the guard (see
              // generateWaitForWhenNotOccupyingTestCase).
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Mon Apr 17 14:48:57 GMT 2023
    - 26.1K bytes
    - Viewed (0)
  6. android/guava/src/com/google/common/util/concurrent/AbstractService.java

      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;
        }
      }
    
      private final Guard isStoppable = new IsStoppableGuard();
    
      @WeakOuter
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Fri May 12 18:32:03 GMT 2023
    - 20.4K bytes
    - Viewed (0)
  7. android/guava-tests/test/com/google/common/util/concurrent/SupplementalMonitorTest.java

        Monitor monitor2 = new Monitor();
        FlagGuard guard = new FlagGuard(monitor2);
        assertThrows(IllegalMonitorStateException.class, () -> monitor1.getWaitQueueLength(guard));
      }
    
      public void testHasWaitersWithWrongMonitorThrowsIMSE() {
        Monitor monitor1 = new Monitor();
        Monitor monitor2 = new Monitor();
        FlagGuard guard = new FlagGuard(monitor2);
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 4.9K bytes
    - Viewed (0)
  8. tensorflow/c/env.cc

      options->stack_size = 0;
      options->guard_size = 0;
      options->numa_node = -1;
    }
    
    TF_Thread* TF_StartThread(const TF_ThreadOptions* options,
                              const char* thread_name, void (*work_func)(void*),
                              void* param) {
      ::tensorflow::ThreadOptions cc_options;
      cc_options.stack_size = options->stack_size;
      cc_options.guard_size = options->guard_size;
    C++
    - Registered: Tue Apr 23 12:39:09 GMT 2024
    - Last Modified: Wed Aug 11 01:20:50 GMT 2021
    - 7K bytes
    - Viewed (0)
  9. guava-tests/test/com/google/common/util/concurrent/SupplementalMonitorTest.java

        Monitor monitor2 = new Monitor();
        FlagGuard guard = new FlagGuard(monitor2);
        assertThrows(IllegalMonitorStateException.class, () -> monitor1.getWaitQueueLength(guard));
      }
    
      public void testHasWaitersWithWrongMonitorThrowsIMSE() {
        Monitor monitor1 = new Monitor();
        Monitor monitor2 = new Monitor();
        FlagGuard guard = new FlagGuard(monitor2);
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 4.9K bytes
    - Viewed (0)
  10. android/guava-tests/benchmark/com/google/common/util/concurrent/MonitorBasedArrayBlockingQueue.java

       * found in any textbook.
       */
    
      /** Monitor guarding all access */
      final Monitor monitor;
    
      /** Guard for waiting takes */
      private final Monitor.Guard notEmpty;
    
      /** Guard for waiting puts */
      private final Monitor.Guard notFull;
    
      // Internal helper methods
    
      /** Circularly increment i. */
      final int inc(int i) {
        return (++i == items.length) ? 0 : i;
      }
    
    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)
Back to top