Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 448 for striped (0.16 sec)

  1. guava/src/com/google/common/util/concurrent/Striped.java

      }
    
      /**
       * Creates a {@code Striped<Lock>} with eagerly initialized, strongly referenced locks. Every lock
       * is reentrant.
       *
       * @param stripes the minimum number of stripes (locks) required
       * @return a new {@code Striped<Lock>}
       */
      public static Striped<Lock> lock(int stripes) {
        return custom(stripes, PaddedLock::new);
      }
    
      /**
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Mon Apr 10 20:55:18 UTC 2023
    - 20.3K bytes
    - Viewed (0)
  2. android/guava/src/com/google/common/util/concurrent/Striped.java

      }
    
      /**
       * Creates a {@code Striped<Lock>} with eagerly initialized, strongly referenced locks. Every lock
       * is reentrant.
       *
       * @param stripes the minimum number of stripes (locks) required
       * @return a new {@code Striped<Lock>}
       */
      public static Striped<Lock> lock(int stripes) {
        return custom(stripes, PaddedLock::new);
      }
    
      /**
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Mon Apr 10 20:55:18 UTC 2023
    - 20.3K bytes
    - Viewed (0)
  3. android/guava-tests/test/com/google/common/util/concurrent/StripedTest.java

        for (Striped<?> striped : allImplementations()) {
          assertBasicInvariants(striped);
        }
      }
    
      private static void assertBasicInvariants(Striped<?> striped) {
        Set<Object> observed = Sets.newIdentityHashSet(); // for the sake of weakly referenced locks.
        // this gets the stripes with #getAt(index)
        for (int i = 0; i < striped.size(); i++) {
          Object object = striped.getAt(i);
          assertNotNull(object);
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Wed Feb 09 22:57:07 UTC 2022
    - 8.4K bytes
    - Viewed (0)
  4. guava-tests/test/com/google/common/util/concurrent/StripedTest.java

        for (Striped<?> striped : allImplementations()) {
          assertBasicInvariants(striped);
        }
      }
    
      private static void assertBasicInvariants(Striped<?> striped) {
        Set<Object> observed = Sets.newIdentityHashSet(); // for the sake of weakly referenced locks.
        // this gets the stripes with #getAt(index)
        for (int i = 0; i < striped.size(); i++) {
          Object object = striped.getAt(i);
          assertNotNull(object);
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Wed Feb 09 22:57:07 UTC 2022
    - 8.4K bytes
    - Viewed (0)
  5. guava-tests/benchmark/com/google/common/util/concurrent/StripedBenchmark.java

        EAGER {
          @Override
          Striped<Lock> get(int stripes) {
            return Striped.lock(stripes);
          }
        },
        LAZY_SMALL {
          @Override
          Striped<Lock> get(int stripes) {
            return new Striped.SmallLazyStriped<>(stripes, LOCK_SUPPLIER);
          }
        },
        LAZY_LARGE {
          @Override
          Striped<Lock> get(int stripes) {
            return new Striped.LargeLazyStriped<>(stripes, LOCK_SUPPLIER);
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Mon Dec 04 17:37:03 UTC 2017
    - 4K bytes
    - Viewed (0)
  6. platforms/core-execution/persistent-cache/src/main/java/org/gradle/cache/internal/ProducerGuard.java

                        producing.notifyAll();
                    }
                }
            }
        }
    
        private static class StripedProducerGuard<T> extends ProducerGuard<T> {
            private final Striped<Lock> locks = Striped.lock(Runtime.getRuntime().availableProcessors() * 4);
    
            @Override
            public <V> V guardByKey(T key, Supplier<V> supplier) {
                Lock lock = locks.get(key);
                lock.lock();
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Fri Apr 26 16:02:31 UTC 2024
    - 4.7K bytes
    - Viewed (0)
  7. platforms/core-execution/persistent-cache/src/test/groovy/org/gradle/cache/internal/ProducerGuardTest.groovy

                            }
                        })
                    }
                }
            }
    
            then:
            calls.get() == 100
    
            where:
            guard << [ProducerGuard.serial(), ProducerGuard.striped(), ProducerGuard.adaptive()]
        }
    
        def "does not call factories with the same key concurrently"() {
            def concurrentCalls = new AtomicInteger()
    
            when:
            async {
                100.times {
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Fri Sep 22 09:08:47 UTC 2023
    - 2.3K bytes
    - Viewed (0)
  8. platforms/documentation/docs/src/docs/css/javadoc.css

    }
    table.striped {
        border-collapse: collapse;
        border: 1px solid var(--table-border-color);
    }
    table.striped > thead {
        background-color: var(--subnav-background-color);
    }
    table.striped > thead > tr > th, table.striped > thead > tr > td {
        border: 1px solid var(--table-border-color);
    }
    table.striped > tbody > tr:nth-child(even) {
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Tue Apr 09 14:25:49 UTC 2024
    - 50.5K bytes
    - Viewed (0)
  9. staging/src/k8s.io/apiserver/pkg/authentication/token/cache/cache_striped.go

    See the License for the specific language governing permissions and
    limitations under the License.
    */
    
    package cache
    
    import (
    	"hash/fnv"
    	"time"
    )
    
    // split cache lookups across N striped caches
    type stripedCache struct {
    	stripeCount uint32
    	hashFunc    func(string) uint32
    	caches      []cache
    }
    
    type hashFunc func(string) uint32
    type newCacheFunc func() cache
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Oct 22 17:16:59 UTC 2018
    - 1.6K bytes
    - Viewed (0)
  10. platforms/core-execution/snapshots/src/main/java/org/gradle/internal/vfs/impl/DefaultFileSystemAccess.java

                virtualFileSystem.invalidateAll();
            }
        }
    
        private static class StripedProducerGuard<T> {
            private final Striped<Lock> locks = Striped.lock(Runtime.getRuntime().availableProcessors() * 4);
    
            public <V> V guardByKey(T key, Supplier<V> supplier) {
                Lock lock = locks.get(key);
                lock.lock();
                try {
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Fri Apr 26 16:02:35 UTC 2024
    - 11.1K bytes
    - Viewed (0)
Back to top