Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 29 for ThreadFactory (0.14 sec)

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

      @Override
      public void setUp() {
        builder = new ThreadFactoryBuilder();
      }
    
      public void testThreadFactoryBuilder_defaults() throws InterruptedException {
        ThreadFactory threadFactory = builder.build();
        Thread thread = threadFactory.newThread(monitoredRunnable);
        checkThreadPoolName(thread, 1);
    
        Thread defaultThread = Executors.defaultThreadFactory().newThread(monitoredRunnable);
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Sep 06 17:04:31 UTC 2023
    - 7.5K bytes
    - Viewed (0)
  2. android/guava-tests/test/com/google/common/util/concurrent/ThreadFactoryBuilderTest.java

      @Override
      public void setUp() {
        builder = new ThreadFactoryBuilder();
      }
    
      public void testThreadFactoryBuilder_defaults() throws InterruptedException {
        ThreadFactory threadFactory = builder.build();
        Thread thread = threadFactory.newThread(monitoredRunnable);
        checkThreadPoolName(thread, 1);
    
        Thread defaultThread = Executors.defaultThreadFactory().newThread(monitoredRunnable);
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Sep 06 17:04:31 UTC 2023
    - 7.5K bytes
    - Viewed (0)
  3. guava-tests/test/com/google/common/util/concurrent/MoreExecutorsTest.java

        ThreadFactory threadFactory = mock(ThreadFactory.class);
        when(executor.getThreadFactory()).thenReturn(threadFactory);
        ScheduledExecutorService unused = application.getExitingScheduledExecutorService(executor);
        application.shutdown();
        verify(executor).shutdown();
      }
    
      public void testPlatformThreadFactory_default() {
        ThreadFactory factory = MoreExecutors.platformThreadFactory();
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 22:10:29 UTC 2024
    - 28.1K bytes
    - Viewed (0)
  4. guava/src/com/google/common/util/concurrent/ThreadFactoryBuilder.java

        return this;
      }
    
      /**
       * Sets the backing {@link ThreadFactory} for new threads created with this ThreadFactory. Threads
       * will be created by invoking #newThread(Runnable) on this backing {@link ThreadFactory}.
       *
       * @param backingThreadFactory the backing {@link ThreadFactory} which will be delegated to during
       *     thread creation.
       * @return this for the builder pattern
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Mon Oct 14 22:50:54 UTC 2024
    - 7.9K bytes
    - Viewed (0)
  5. okhttp/src/test/java/okhttp3/internal/concurrent/TaskRunnerRealBackendTest.kt

          log.put("uncaught exception: $throwable")
        }
    
      private val threadFactory =
        ThreadFactory { runnable ->
          Thread(runnable, "TaskRunnerRealBackendTest").apply {
            isDaemon = true
            uncaughtExceptionHandler = loggingUncaughtExceptionHandler
          }
        }
    
      private val backend = TaskRunner.RealBackend(threadFactory)
      private val taskRunner = TaskRunner(backend)
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 3.5K bytes
    - Viewed (0)
  6. okhttp-testing-support/src/main/kotlin/okhttp3/TestUtilJvm.kt

      fun Throwable.assertSuppressed(block: (List<@JvmSuppressWildcards Throwable>) -> Unit) {
        if (isGraalVmImage) return
        block(suppressed.toList())
      }
    
      @JvmStatic
      fun threadFactory(name: String): ThreadFactory {
        return object : ThreadFactory {
          private var nextId = 1
    
          override fun newThread(runnable: Runnable): Thread {
            return Thread(runnable, "$name-${nextId++}")
          }
        }
      }
    }
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Thu Apr 11 22:09:35 UTC 2024
    - 4.3K bytes
    - Viewed (0)
  7. android/guava-tests/test/com/google/common/util/concurrent/MoreExecutorsTest.java

        ThreadFactory threadFactory = mock(ThreadFactory.class);
        when(executor.getThreadFactory()).thenReturn(threadFactory);
        ScheduledExecutorService unused = application.getExitingScheduledExecutorService(executor);
        application.shutdown();
        verify(executor).shutdown();
      }
    
      public void testPlatformThreadFactory_default() {
        ThreadFactory factory = MoreExecutors.platformThreadFactory();
    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. android/guava/src/com/google/common/util/concurrent/JdkFutureAdapters.java

        private static final ThreadFactory threadFactory =
            new ThreadFactoryBuilder()
                .setDaemon(true)
                .setNameFormat("ListenableFutureAdapter-thread-%d")
                .build();
        private static final Executor defaultAdapterExecutor =
            Executors.newCachedThreadPool(threadFactory);
    
        private final Executor adapterExecutor;
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Dec 14 20:35:03 UTC 2023
    - 7.5K bytes
    - Viewed (0)
  9. guava/src/com/google/common/util/concurrent/JdkFutureAdapters.java

        private static final ThreadFactory threadFactory =
            new ThreadFactoryBuilder()
                .setDaemon(true)
                .setNameFormat("ListenableFutureAdapter-thread-%d")
                .build();
        private static final Executor defaultAdapterExecutor =
            Executors.newCachedThreadPool(threadFactory);
    
        private final Executor adapterExecutor;
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Dec 14 20:35:03 UTC 2023
    - 7.5K bytes
    - Viewed (0)
  10. okhttp/src/main/kotlin/okhttp3/internal/concurrent/TaskRunner.kt

          runnable: Runnable,
        )
      }
    
      class RealBackend(threadFactory: ThreadFactory) : Backend {
        val executor =
          ThreadPoolExecutor(
            // corePoolSize:
            0,
            // maximumPoolSize:
            Int.MAX_VALUE,
            // keepAliveTime:
            60L,
            TimeUnit.SECONDS,
            SynchronousQueue(),
            threadFactory,
          )
    
        override fun nanoTime() = System.nanoTime()
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Apr 29 00:33:04 UTC 2024
    - 10.6K bytes
    - Viewed (0)
Back to top