Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 1 - 1 of 1 for computeIfAbsentWhenDifferentKeyRaceLostDuringCompute (0.37 seconds)

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

        assertThat(atomicTags.computeIfAbsent(String::class) { "b" }).isEqualTo("a")
        assertThat(atomicTags.get()[String::class]).isEqualTo("a")
      }
    
      @Test
      fun computeIfAbsentWhenDifferentKeyRaceLostDuringCompute() {
        val tags = EmptyTags
        val atomicTags = AtomicReference<Tags>(tags)
        val result =
          atomicTags.computeIfAbsent(String::class) {
    Created: Fri Dec 26 11:42:13 GMT 2025
    - Last Modified: Fri Oct 24 11:37:46 GMT 2025
    - 7.1K bytes
    - Click Count (0)
Back to Top