Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 19 for Race (0.01 sec)

  1. okhttp/src/jvmTest/kotlin/okhttp3/internal/TagsTest.kt

      fun computeIfAbsentWhenDifferentKeyRaceLostDuringCompute() {
        val tags = EmptyTags
        val atomicTags = AtomicReference<Tags>(tags)
        val result =
          atomicTags.computeIfAbsent(String::class) {
            // 'Race' by making another computeIfAbsent call. In practice this would be another thread.
            assertThat(atomicTags.computeIfAbsent(Integer::class) { 5 as Integer }).isEqualTo(5)
            "a"
          }
    Registered: Fri Dec 26 11:42:13 UTC 2025
    - Last Modified: Fri Oct 24 11:37:46 UTC 2025
    - 7.1K bytes
    - Viewed (0)
  2. android/guava-tests/test/com/google/common/collect/ConcurrentHashMultisetTest.java

        assertThrows(IllegalArgumentException.class, () -> multiset.add(KEY, COUNT_TO_ADD));
      }
    
      /**
       * Simulate some of the races that can happen on add. We can't easily simulate the race that
       * happens when an {@link AtomicInteger#compareAndSet} fails, but we can simulate the case where
       * the putIfAbsent returns a non-null value, and the case where the replace() of an observed zero
       * fails.
       */
    Registered: Fri Dec 26 12:43:10 UTC 2025
    - Last Modified: Mon Dec 08 22:42:14 UTC 2025
    - 16.3K bytes
    - Viewed (0)
  3. okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/Tags.kt

        }
    
        // If we successfully add the computed element, we're done.
        val newTags = tags.plus(type, computed)
        if (compareAndSet(tags, newTags)) return computed
    
        // We lost the race. Possibly to other code that was putting a *different* key. Try again!
      }
    Registered: Fri Dec 26 11:42:13 UTC 2025
    - Last Modified: Fri Oct 24 11:37:46 UTC 2025
    - 3.9K bytes
    - Viewed (0)
  4. okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/connection/ConnectPlan.kt

      internal val connectionSpecIndex: Int,
      internal val isTlsFallback: Boolean,
    ) : RoutePlanner.Plan,
      ExchangeCodec.Carrier {
      /** True if this connect was canceled; typically because it lost a race. */
      @Volatile private var canceled = false
    
      // These properties are initialized by connect() and never reassigned.
    
      /** The low-level TCP socket. */
      private var rawSocket: JavaNetSocket? = null
    
      /**
    Registered: Fri Dec 26 11:42:13 UTC 2025
    - Last Modified: Wed Oct 08 03:50:05 UTC 2025
    - 19.3K bytes
    - Viewed (2)
  5. android/guava/src/com/google/common/collect/ConcurrentHashMultiset.java

                  || countMap.replace(element, existingCounter, newCounter)) {
                return 0;
              }
              break;
            }
          }
    
          // If we're still here, there was a race, so just try again.
        }
      }
    
      /**
       * Removes a number of occurrences of the specified element from this multiset. If the multiset
    Registered: Fri Dec 26 12:43:10 UTC 2025
    - Last Modified: Mon Dec 08 22:42:14 UTC 2025
    - 22.3K bytes
    - Viewed (0)
  6. fess-crawler/src/test/java/org/codelibs/fess/net/protocol/gcs/HandlerTest.java

            assertTrue("Threads did not complete in time", doneLatch.await(5, TimeUnit.SECONDS));
    
            // All threads should fail with the same IOException (project ID is blank)
            // But importantly, there should be no race condition errors
            assertEquals(threadCount, failureCount.get());
            assertEquals(0, successCount.get());
    
            // All exceptions should be about project ID being blank
    Registered: Sat Dec 20 11:21:39 UTC 2025
    - Last Modified: Thu Dec 11 08:38:29 UTC 2025
    - 14.1K bytes
    - Viewed (0)
  7. CHANGELOG.md

        the previous alpha due to an unexpected race.
    
    
    ## Version 5.0.0-alpha.5
    
    _2022-02-21_
    
     *  Fix: Don't include [Assertk][assertk] in OkHttp's production dependencies. This regression was
        introduced in the 5.0.0-alpha.4 release.
     *  Fix: Don't ask `Dns` implementations to resolve strings that are already IP addresses.
     *  Fix: Change fast fallback to race TCP handshakes only. To avoid wasted work, OkHttp will not
    Registered: Fri Dec 26 11:42:13 UTC 2025
    - Last Modified: Fri Dec 05 16:02:59 UTC 2025
    - 36.2K bytes
    - Viewed (2)
  8. okhttp-testing-support/src/main/kotlin/okhttp3/OkHttpClientTestRule.kt

        testClient?.let {
          val connectionPool = it.connectionPool
    
          connectionPool.evictAll()
          if (connectionPool.connectionCount() > 0) {
            // Minimise test flakiness due to possible race conditions with connections closing.
            // Some number of tests will report here, but not fail due to this delay.
            println("Delaying to avoid flakes")
            Thread.sleep(500L)
    Registered: Fri Dec 26 11:42:13 UTC 2025
    - Last Modified: Tue Nov 04 19:13:52 UTC 2025
    - 10.8K bytes
    - Viewed (0)
  9. android/guava-tests/test/com/google/common/util/concurrent/AbstractFutureTest.java

        thread.join();
        // It's possible to race and suspend the thread just before the park call actually takes effect,
        // causing the thread to be suspended for 3.5 seconds, and then park itself for 2 seconds after
        // being resumed. To avoid a flake in this scenario, calculate how long that thread actually
        // waited and assert based on that time. Empirically, the race where the thread ends up waiting
    Registered: Fri Dec 26 12:43:10 UTC 2025
    - Last Modified: Thu Dec 11 20:45:32 UTC 2025
    - 46.8K bytes
    - Viewed (0)
  10. fess-crawler/src/test/java/org/codelibs/fess/net/protocol/storage/HandlerTest.java

            assertTrue("Threads did not complete in time", doneLatch.await(5, TimeUnit.SECONDS));
    
            // All threads should fail with the same IOException (endpoint is blank)
            // But importantly, there should be no race condition errors
            assertEquals(threadCount, failureCount.get());
            assertEquals(0, successCount.get());
    
            // All exceptions should be about endpoint being blank
            for (Exception e : exceptions) {
    Registered: Sat Dec 20 11:21:39 UTC 2025
    - Last Modified: Thu Dec 11 08:38:29 UTC 2025
    - 14.4K bytes
    - Viewed (0)
Back to top