Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 30 for ThreadFactory (0.21 sec)

  1. 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();
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 28.2K 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);
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 7.5K bytes
    - Viewed (0)
  3. maven-core/src/main/java/org/apache/maven/lifecycle/internal/BuildThreadFactory.java

     * under the License.
     */
    package org.apache.maven.lifecycle.internal;
    
    import java.util.concurrent.ThreadFactory;
    import java.util.concurrent.atomic.AtomicInteger;
    
    /**
     * Simple {@link ThreadFactory} implementation that ensures the corresponding threads have a meaningful name.
     */
    public class BuildThreadFactory implements ThreadFactory {
        private final AtomicInteger id = new AtomicInteger();
    
    Java
    - Registered: Sun Apr 28 03:35:10 GMT 2024
    - Last Modified: Wed Jan 10 12:55:54 GMT 2024
    - 1.4K bytes
    - Viewed (0)
  4. 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;
    
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Thu Dec 14 20:35:03 GMT 2023
    - 7.5K bytes
    - Viewed (0)
  5. android/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
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed May 10 21:56:03 GMT 2023
    - 7.6K bytes
    - Viewed (0)
  6. 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);
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 7.5K bytes
    - Viewed (0)
  7. 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();
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 28.2K bytes
    - Viewed (3)
  8. 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++}")
          }
        }
      }
    }
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Thu Apr 11 22:09:35 GMT 2024
    - 4.3K bytes
    - Viewed (0)
  9. okhttp-tls/src/test/java/okhttp3/tls/HandshakeCertificatesTest.kt

    import javax.net.ServerSocketFactory
    import javax.net.SocketFactory
    import javax.net.ssl.SSLSocket
    import okhttp3.Handshake
    import okhttp3.Handshake.Companion.handshake
    import okhttp3.TestUtil.threadFactory
    import okhttp3.internal.closeQuietly
    import okhttp3.testing.PlatformRule
    import okio.ByteString.Companion.toByteString
    import org.junit.jupiter.api.AfterEach
    import org.junit.jupiter.api.BeforeEach
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Thu Apr 11 22:09:35 GMT 2024
    - 7.1K bytes
    - Viewed (0)
  10. 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)
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 3.5K bytes
    - Viewed (0)
Back to top