Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 1 - 10 of 32 for Guard (0.03 seconds)

  1. android/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
    Created: Fri Dec 26 12:43:10 GMT 2025
    - Last Modified: Thu Dec 11 21:00:51 GMT 2025
    - 27.1K bytes
    - Click Count (0)
  2. 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);
    Created: Fri Dec 26 12:43:10 GMT 2025
    - Last Modified: Tue Oct 28 16:03:47 GMT 2025
    - 5K bytes
    - Click Count (0)
  3. 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);
    Created: Fri Dec 26 12:43:10 GMT 2025
    - Last Modified: Tue Oct 28 16:03:47 GMT 2025
    - 5K bytes
    - Click Count (0)
  4. 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
    Created: Fri Dec 26 12:43:10 GMT 2025
    - Last Modified: Wed Feb 19 21:24:11 GMT 2025
    - 20.3K bytes
    - Click Count (0)
  5. 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
    Created: Fri Dec 26 12:43:10 GMT 2025
    - Last Modified: Wed Feb 19 21:24:11 GMT 2025
    - 20.7K bytes
    - Click Count (0)
  6. 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;
      }
    
    Created: Fri Dec 26 12:43:10 GMT 2025
    - Last Modified: Tue May 13 18:46:00 GMT 2025
    - 22.4K bytes
    - Click Count (0)
  7. okhttp/src/jvmTest/kotlin/okhttp3/internal/platform/PlatformTest.kt

    import org.junit.jupiter.api.extension.RegisterExtension
    
    class PlatformTest {
      @RegisterExtension
      var platform = PlatformRule()
    
      @Test
      fun alwaysBuilds() {
        Platform()
      }
    
      /** Guard against the default value changing by accident.  */
      @Test
      fun defaultPrefix() {
        assertThat(Platform().getPrefix()).isEqualTo("OkHttp")
      }
    
      @Test
      fun testToStringIsClassname() {
    Created: Fri Dec 26 11:42:13 GMT 2025
    - Last Modified: Fri Dec 27 13:39:56 GMT 2024
    - 1.4K bytes
    - Click Count (0)
  8. src/test/java/jcifs/smb/WinErrorTest.java

            assertEquals(WinError.WINERR_CODES.length, WinError.WINERR_MESSAGES.length, "Codes/messages length mismatch");
    
            // Exact content check to guard against accidental reordering or drift
            assertArrayEquals(
                    new int[] { WinError.ERROR_SUCCESS, WinError.ERROR_ACCESS_DENIED, WinError.ERROR_REQ_NOT_ACCEP, WinError.ERROR_BAD_PIPE,
    Created: Sat Dec 20 13:44:44 GMT 2025
    - Last Modified: Thu Aug 14 05:31:44 GMT 2025
    - 8.4K bytes
    - Click Count (0)
  9. impl/maven-core/src/main/java/org/apache/maven/properties/internal/SystemProperties.java

         * @return Copy of the given properties.
         */
        public static Properties copyProperties(Properties properties) {
            final Properties copyProperties = new Properties();
            // guard against modification/removal of keys in the given properties (MNG-5670, MNG-6053, MNG-6105)
            synchronized (properties) {
                copyProperties.putAll(properties);
            }
            return copyProperties;
        }
    Created: Sun Dec 28 03:35:09 GMT 2025
    - Last Modified: Fri Oct 25 12:31:46 GMT 2024
    - 2K bytes
    - Click Count (0)
  10. impl/maven-core/src/main/java/org/apache/maven/project/DefaultProjectDependenciesResolver.java

                            || dependency.getArtifactId().isEmpty()
                            || dependency.getVersion() == null
                            || dependency.getVersion().isEmpty()) {
                        // guard against case where best-effort resolution for invalid models is requested
                        continue;
                    }
                    collect.addDependency(RepositoryUtils.toDependency(dependency, stereotypes));
    Created: Sun Dec 28 03:35:09 GMT 2025
    - Last Modified: Wed Jul 23 10:13:56 GMT 2025
    - 9.2K bytes
    - Click Count (0)
Back to Top