Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 14 for newSingleThreadExecutor (0.2 sec)

  1. okhttp-android/src/main/kotlin/okhttp3/android/AndroidAsyncDns.kt

      private val network: Network? = null,
    ) : AsyncDns {
      @RequiresApi(Build.VERSION_CODES.Q)
      internal val resolver = DnsResolver.getInstance()
      private val executor = Executors.newSingleThreadExecutor()
    
      override fun query(
        hostname: String,
        callback: AsyncDns.Callback,
      ) {
        try {
          resolver.query(
            network,
            hostname,
            dnsClass.type,
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Apr 01 10:07:48 UTC 2024
    - 2.8K bytes
    - Viewed (0)
  2. android/guava-tests/test/com/google/common/util/concurrent/AbstractExecutionThreadServiceTest.java

      }
    
      private class FakeService extends AbstractExecutionThreadService implements TearDown {
    
        private final ExecutorService executor = Executors.newSingleThreadExecutor();
    
        FakeService() {
          tearDownStack.addTearDown(this);
        }
    
        volatile int startupCalled = 0;
        volatile int shutdownCalled = 0;
        volatile int runCalled = 0;
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 22:10:29 UTC 2024
    - 12.7K bytes
    - Viewed (0)
  3. okhttp/src/test/java/okhttp3/internal/http2/MockHttp2Peer.kt

      private val outFrames: MutableList<OutFrame> = ArrayList()
      private val inFrames: BlockingQueue<InFrame> = LinkedBlockingQueue()
      private var port = 0
      private val executor = Executors.newSingleThreadExecutor(threadFactory("MockHttp2Peer"))
      private var serverSocket: ServerSocket? = null
      private var socket: Socket? = null
    
      fun setClient(client: Boolean) {
        if (this.client == client) return
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Thu Apr 11 22:09:35 UTC 2024
    - 8.7K bytes
    - Viewed (0)
  4. android/guava-tests/test/com/google/common/util/concurrent/SequentialExecutorTest.java

        class MyError extends Error {}
        final CyclicBarrier barrier = new CyclicBarrier(2);
        // we need to make sure the error gets thrown on a different thread.
        ExecutorService service = Executors.newSingleThreadExecutor();
        try {
          final SequentialExecutor executor = new SequentialExecutor(service);
          Runnable errorTask =
              new Runnable() {
                @Override
                public void run() {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 22:10:29 UTC 2024
    - 11.4K bytes
    - Viewed (0)
  5. guava-tests/test/com/google/common/util/concurrent/AbstractExecutionThreadServiceTest.java

      }
    
      private class FakeService extends AbstractExecutionThreadService implements TearDown {
    
        private final ExecutorService executor = Executors.newSingleThreadExecutor();
    
        FakeService() {
          tearDownStack.addTearDown(this);
        }
    
        volatile int startupCalled = 0;
        volatile int shutdownCalled = 0;
        volatile int runCalled = 0;
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 22:10:29 UTC 2024
    - 12.7K bytes
    - Viewed (0)
  6. guava-tests/test/com/google/common/util/concurrent/SequentialExecutorTest.java

        class MyError extends Error {}
        final CyclicBarrier barrier = new CyclicBarrier(2);
        // we need to make sure the error gets thrown on a different thread.
        ExecutorService service = Executors.newSingleThreadExecutor();
        try {
          final SequentialExecutor executor = new SequentialExecutor(service);
          Runnable errorTask =
              new Runnable() {
                @Override
                public void run() {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 22:10:29 UTC 2024
    - 11.4K bytes
    - Viewed (0)
  7. guava-tests/test/com/google/common/util/concurrent/MoreExecutorsTest.java

      private static final long HALF_SECOND_NANOS = NANOSECONDS.convert(1L, SECONDS) / 2;
    
      public void testShutdownAndAwaitTermination_immediateShutdown() throws Exception {
        ExecutorService service = Executors.newSingleThreadExecutor();
        assertTrue(shutdownAndAwaitTermination(service, 1L, SECONDS));
        assertTrue(service.isTerminated());
      }
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 22:10:29 UTC 2024
    - 28.1K bytes
    - Viewed (0)
  8. guava-tests/test/com/google/common/io/MoreFilesTest.java

            Path dirToDelete = fs.getPath("dir/b/i");
            Path changingFile = dirToDelete.resolve("j/l");
            Path symlinkTarget = fs.getPath("/dontdelete");
    
            ExecutorService executor = Executors.newSingleThreadExecutor();
            startDirectorySymlinkSwitching(changingFile, symlinkTarget, executor);
    
            try {
              for (int i = 0; i < iterations; i++) {
                try {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Oct 17 02:42:09 UTC 2024
    - 27.4K bytes
    - Viewed (0)
  9. android/guava-tests/test/com/google/common/io/MoreFilesTest.java

            Path dirToDelete = fs.getPath("dir/b/i");
            Path changingFile = dirToDelete.resolve("j/l");
            Path symlinkTarget = fs.getPath("/dontdelete");
    
            ExecutorService executor = Executors.newSingleThreadExecutor();
            startDirectorySymlinkSwitching(changingFile, symlinkTarget, executor);
    
            try {
              for (int i = 0; i < iterations; i++) {
                try {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Oct 31 16:07:00 UTC 2024
    - 26.5K bytes
    - Viewed (0)
  10. android/guava-tests/test/com/google/common/util/concurrent/MoreExecutorsTest.java

      private static final long HALF_SECOND_NANOS = NANOSECONDS.convert(1L, SECONDS) / 2;
    
      public void testShutdownAndAwaitTermination_immediateShutdown() throws Exception {
        ExecutorService service = Executors.newSingleThreadExecutor();
        assertTrue(shutdownAndAwaitTermination(service, 1L, SECONDS));
        assertTrue(service.isTerminated());
      }
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 22:10:29 UTC 2024
    - 28.1K bytes
    - Viewed (0)
Back to top