Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 109 for Synchronized (0.19 sec)

  1. android/guava/src/com/google/common/collect/Synchronized.java

        }
    
        @Override
        public ListIterator<E> listIterator(int index) {
          return delegate().listIterator(index); // manually synchronized
        }
    
        @Override
        public E remove(int index) {
          synchronized (mutex) {
            return delegate().remove(index);
          }
        }
    
        @Override
        public E set(int index, E element) {
          synchronized (mutex) {
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Apr 01 16:15:01 GMT 2024
    - 53.4K bytes
    - Viewed (0)
  2. guava-tests/test/com/google/common/collect/SynchronizedMultimapTest.java

                            Synchronized.setMultimap(inner, inner.mutex);
                        for (Entry<String, String> entry : entries) {
                          outer.put(entry.getKey(), entry.getValue());
                        }
                        return outer;
                      }
                    })
                .named("Synchronized.setMultimap")
                .withFeatures(
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed May 09 15:17:25 GMT 2018
    - 8.5K bytes
    - Viewed (0)
  3. android/guava/src/com/google/common/io/CharSequenceReader.java

       *   mutation, which is not an actual risk because we use `synchronized`.
       * - Make `remaining` require a non-null `seq` argument. But this is a bit weird because the
       *   method, while it would avoid the instance field `seq` would still access the instance field
       *   `pos`.
       */
    
      @Override
      public synchronized int read(CharBuffer target) throws IOException {
        checkNotNull(target);
        checkOpen();
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Feb 28 20:13:02 GMT 2023
    - 4.5K bytes
    - Viewed (0)
  4. android/guava/src/com/google/common/util/concurrent/SequentialExecutor.java

       * execution of tasks will stop until a call to this method is made.
       */
      @Override
      public void execute(Runnable task) {
        checkNotNull(task);
        Runnable submittedTask;
        long oldRunCount;
        synchronized (queue) {
          // If the worker is already running (or execute() on the delegate returned successfully, and
          // the worker has yet to start) then we don't need to start the worker.
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Thu Feb 01 21:46:34 GMT 2024
    - 10.6K bytes
    - Viewed (0)
  5. android/guava-tests/test/com/google/common/util/concurrent/FutureCallbackTest.java

          this.failure = expectedFailure;
        }
    
        @Override
        public synchronized void onSuccess(String result) {
          assertFalse(wasCalled);
          wasCalled = true;
          assertEquals(value, result);
        }
    
        @Override
        public synchronized void onFailure(Throwable t) {
          assertFalse(wasCalled);
          wasCalled = true;
          assertEquals(failure, t);
        }
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Thu Apr 06 12:56:11 GMT 2023
    - 6.3K bytes
    - Viewed (0)
  6. android/guava-tests/benchmark/com/google/common/util/concurrent/ExecutionListBenchmark.java

          synchronized (this) {
            if (!executed) {
              runnables = new RunnableExecutorPair(runnable, executor, runnables);
              return;
            }
          }
          executeListener(runnable, executor);
        }
    
        public void execute() {
          RunnableExecutorPair list;
          synchronized (this) {
            if (executed) {
              return;
            }
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Apr 17 15:19:38 GMT 2023
    - 20.4K bytes
    - Viewed (0)
  7. android/guava/src/com/google/common/collect/Queues.java

       *
       * @param queue the queue to be wrapped in a synchronized view
       * @return a synchronized view of the specified queue
       * @since 14.0
       */
      public static <E extends @Nullable Object> Queue<E> synchronizedQueue(Queue<E> queue) {
        return Synchronized.queue(queue, null);
      }
    
      /**
       * Returns a synchronized (thread-safe) deque backed by the specified deque. In order to guarantee
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Apr 01 16:15:01 GMT 2024
    - 16K bytes
    - Viewed (0)
  8. guava-tests/test/com/google/common/collect/SynchronizedMapTest.java

     * limitations under the License.
     */
    
    package com.google.common.collect;
    
    import static com.google.common.base.Preconditions.checkNotNull;
    
    import com.google.common.collect.Synchronized.SynchronizedCollection;
    import com.google.common.collect.Synchronized.SynchronizedSet;
    import com.google.common.testing.SerializableTester;
    import java.io.Serializable;
    import java.util.Collection;
    import java.util.HashMap;
    import java.util.Map;
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Apr 19 19:24:36 GMT 2023
    - 5.8K bytes
    - Viewed (0)
  9. guava-testlib/src/com/google/common/collect/testing/testers/CollectionStreamTester.java

        synchronized (collection) { // to allow Collections.synchronized* tests to pass
          Helpers.assertEqualIgnoringOrder(
              getSampleElements(), Arrays.asList(collection.stream().toArray()));
        }
      }
    
      @CollectionFeature.Require(KNOWN_ORDER)
      public void testStreamToArrayKnownOrder() {
        synchronized (collection) { // to allow Collections.synchronized* tests to pass
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Jan 09 20:10:38 GMT 2018
    - 2.3K bytes
    - Viewed (0)
  10. guava-tests/test/com/google/common/util/concurrent/AbstractServiceTest.java

          completionLatch.await();
          synchronized (this) {
            return ImmutableList.copyOf(stateHistory);
          }
        }
    
        @Override
        public synchronized void starting() {
          assertTrue(stateHistory.isEmpty());
          assertNotSame(State.NEW, service.state());
          stateHistory.add(State.STARTING);
        }
    
        @Override
        public synchronized void running() {
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 29.3K bytes
    - Viewed (0)
Back to top