Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 37 for scheduler (0.56 sec)

  1. android/guava-tests/test/com/google/common/util/concurrent/AbstractScheduledServiceTest.java

                }
              }
            };
        TestCustomScheduler scheduler = new TestCustomScheduler();
        Cancellable future = scheduler.schedule(null, Executors.newScheduledThreadPool(10), task);
        firstBarrier.await();
        assertEquals(1, scheduler.scheduleCounter.get());
        secondBarrier.await();
        firstBarrier.await();
        assertEquals(2, scheduler.scheduleCounter.get());
        shouldWait.set(false);
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Wed Sep 06 17:04:31 UTC 2023
    - 22.5K bytes
    - Viewed (0)
  2. guava-tests/test/com/google/common/util/concurrent/AbstractScheduledServiceTest.java

                }
              }
            };
        TestCustomScheduler scheduler = new TestCustomScheduler();
        Cancellable future = scheduler.schedule(null, Executors.newScheduledThreadPool(10), task);
        firstBarrier.await();
        assertEquals(1, scheduler.scheduleCounter.get());
        secondBarrier.await();
        firstBarrier.await();
        assertEquals(2, scheduler.scheduleCounter.get());
        shouldWait.set(false);
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Wed Sep 06 17:04:31 UTC 2023
    - 22.5K bytes
    - Viewed (0)
  3. guava/src/com/google/common/util/concurrent/AbstractScheduledService.java

          private ScheduledFuture<@Nullable Void> submitToExecutor(Schedule schedule) {
            return executor.schedule(this, schedule.delay, schedule.unit);
          }
        }
    
        /**
         * Contains the most recently submitted {@code Future}, which may be cancelled or updated,
         * always under a lock.
         */
        private static final class SupplantableFuture implements Cancellable {
          private final ReentrantLock lock;
    
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Wed Dec 13 19:45:20 UTC 2023
    - 27.5K bytes
    - Viewed (0)
  4. android/guava/src/com/google/common/util/concurrent/AbstractScheduledService.java

          private ScheduledFuture<@Nullable Void> submitToExecutor(Schedule schedule) {
            return executor.schedule(this, schedule.delay, schedule.unit);
          }
        }
    
        /**
         * Contains the most recently submitted {@code Future}, which may be cancelled or updated,
         * always under a lock.
         */
        private static final class SupplantableFuture implements Cancellable {
          private final ReentrantLock lock;
    
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Wed Dec 13 19:45:20 UTC 2023
    - 25.8K bytes
    - Viewed (0)
  5. android/guava-testlib/test/com/google/common/util/concurrent/testing/TestingExecutorsTest.java

            new Runnable() {
              @Override
              public void run() {
                taskDone = true;
              }
            };
        ScheduledFuture<?> future =
            TestingExecutors.noOpScheduledExecutor().schedule(task, 10, TimeUnit.MILLISECONDS);
        Thread.sleep(20);
        assertFalse(taskDone);
        assertFalse(future.isDone());
      }
    
      public void testNoOpScheduledExecutorShutdown() {
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Wed Sep 06 17:04:31 UTC 2023
    - 3.7K bytes
    - Viewed (0)
  6. guava-testlib/test/com/google/common/util/concurrent/testing/TestingExecutorsTest.java

            new Runnable() {
              @Override
              public void run() {
                taskDone = true;
              }
            };
        ScheduledFuture<?> future =
            TestingExecutors.noOpScheduledExecutor().schedule(task, 10, TimeUnit.MILLISECONDS);
        Thread.sleep(20);
        assertFalse(taskDone);
        assertFalse(future.isDone());
      }
    
      public void testNoOpScheduledExecutorShutdown() {
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Wed Sep 06 17:04:31 UTC 2023
    - 3.7K bytes
    - Viewed (0)
  7. android/guava-tests/test/com/google/common/util/concurrent/SequentialExecutorTest.java

              public void run() {
                totalCalls.incrementAndGet();
                // Make sure that no other tasks are scheduled to run while this is running.
                assertFalse(fakePool.hasNext());
              }
            };
    
        assertFalse(fakePool.hasNext());
        e.execute(intCounter);
        // A task should have been scheduled
        assertTrue(fakePool.hasNext());
        e.execute(intCounter);
        // Our executor hasn't run any tasks yet.
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Wed Sep 06 17:04:31 UTC 2023
    - 11.4K bytes
    - Viewed (0)
  8. .github/workflows/scorecard.yml

      branch_protection_rule:
      # To guarantee Maintained check is occasionally updated. See
      # https://github.com/ossf/scorecard/blob/main/docs/checks.md#maintained
      schedule:
        - cron: '45 9 * * 0'
      push:
        branches: [ "master" ]
    
    # Declare default permissions as read only.
    permissions: read-all
    
    jobs:
      analysis:
        name: Scorecard analysis
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Tue Jun 04 17:53:21 UTC 2024
    - 2.9K bytes
    - Viewed (0)
  9. guava-tests/test/com/google/common/util/concurrent/UninterruptiblesTest.java

        thread.joinSuccessfully(LONG_DELAY_MS);
        assertInterrupted();
      }
    
      public void testJoinTimeoutMultiInterruptExpired() {
        /*
         * We don't "need" to schedule a thread completion at all here, but by doing
         * so, we come the closest we can to testing that the wait time is
         * appropriately decreased on each progressive join() call.
         */
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Mon Jun 10 16:06:39 UTC 2024
    - 31.7K bytes
    - Viewed (0)
  10. android/guava-tests/test/com/google/common/util/concurrent/MoreExecutorsTest.java

                completed.countDown();
              }
            };
        ListeningScheduledExecutorService service = listeningDecorator(delegate);
        ListenableFuture<Integer> future =
            service.schedule(Callables.returning(42), 1, TimeUnit.MILLISECONDS);
    
        /*
         * Wait not just until the Future's value is set (as in future.get()) but
         * also until ListeningScheduledExecutorService's wrapper task is done
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Wed Sep 06 17:04:31 UTC 2023
    - 28.2K bytes
    - Viewed (0)
Back to top