Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 15 for threadFactory (0.08 sec)

  1. 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)
  2. 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)
  3. 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)
  4. okhttp-testing-support/src/main/kotlin/okhttp3/OkHttpClientTestRule.kt

        }
    
      private fun loomThreadFactory(): ThreadFactory {
        val ofVirtual = Thread::class.java.getMethod("ofVirtual").invoke(null)
    
        return Class.forName("java.lang.Thread\$Builder")
          .getMethod("factory")
          .invoke(ofVirtual) as ThreadFactory
      }
    
      private fun isLoom(): Boolean {
        return getPlatformSystemProperty() == LOOM_PROPERTY
      }
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 10.5K bytes
    - Viewed (0)
  5. okhttp/src/main/kotlin/okhttp3/internal/-UtilJvm.kt

    /** GMT and UTC are equivalent for our purposes. */
    @JvmField
    internal val UTC: TimeZone = TimeZone.getTimeZone("GMT")!!
    
    internal fun threadFactory(
      name: String,
      daemon: Boolean,
    ): ThreadFactory =
      ThreadFactory { runnable ->
        Thread(runnable, name).apply {
          isDaemon = daemon
        }
      }
    
    internal fun HttpUrl.toHostHeader(includeDefaultPort: Boolean = false): String {
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon May 13 13:42:37 UTC 2024
    - 10.7K bytes
    - Viewed (0)
  6. okhttp-testing-support/src/main/kotlin/okhttp3/internal/concurrent/TaskFaker.kt

    import java.util.concurrent.Executors
    import java.util.concurrent.TimeUnit
    import java.util.logging.Logger
    import kotlin.concurrent.withLock
    import okhttp3.OkHttpClient
    import okhttp3.TestUtil.threadFactory
    
    /**
     * Runs a [TaskRunner] in a controlled environment so that everything is sequential and
     * deterministic.
     *
     * This class ensures that at most one thread is running at a time. This is initially the JUnit test
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Apr 29 00:33:04 UTC 2024
    - 12.6K bytes
    - Viewed (0)
  7. android/guava-testlib/src/com/google/common/testing/ArbitraryInstances.java

    import java.util.concurrent.CountDownLatch;
    import java.util.concurrent.Executor;
    import java.util.concurrent.LinkedBlockingDeque;
    import java.util.concurrent.ScheduledThreadPoolExecutor;
    import java.util.concurrent.ThreadFactory;
    import java.util.concurrent.ThreadPoolExecutor;
    import java.util.concurrent.TimeUnit;
    import java.util.logging.Level;
    import java.util.logging.Logger;
    import java.util.regex.MatchResult;
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 00:26:48 UTC 2024
    - 20.8K bytes
    - Viewed (0)
  8. guava/src/com/google/common/util/concurrent/MoreExecutors.java

    import java.util.concurrent.ThreadFactory;
    import java.util.concurrent.ThreadPoolExecutor;
    import java.util.concurrent.TimeUnit;
    import java.util.concurrent.TimeoutException;
    import org.checkerframework.checker.nullness.qual.Nullable;
    
    /**
     * Factory and utility methods for {@link java.util.concurrent.Executor}, {@link ExecutorService},
     * and {@link java.util.concurrent.ThreadFactory}.
     *
     * @author Eric Fellheimer
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 00:51:36 UTC 2024
    - 44.1K bytes
    - Viewed (0)
  9. guava-testlib/src/com/google/common/testing/ArbitraryInstances.java

    import java.util.concurrent.CountDownLatch;
    import java.util.concurrent.Executor;
    import java.util.concurrent.LinkedBlockingDeque;
    import java.util.concurrent.ScheduledThreadPoolExecutor;
    import java.util.concurrent.ThreadFactory;
    import java.util.concurrent.ThreadPoolExecutor;
    import java.util.concurrent.TimeUnit;
    import java.util.logging.Level;
    import java.util.logging.Logger;
    import java.util.regex.MatchResult;
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 00:26:48 UTC 2024
    - 21.2K bytes
    - Viewed (0)
  10. compat/maven-compat/src/main/java/org/apache/maven/artifact/resolver/DefaultArtifactResolver.java

    import java.util.Set;
    import java.util.concurrent.CountDownLatch;
    import java.util.concurrent.Executor;
    import java.util.concurrent.ExecutorService;
    import java.util.concurrent.LinkedBlockingQueue;
    import java.util.concurrent.ThreadFactory;
    import java.util.concurrent.ThreadPoolExecutor;
    import java.util.concurrent.TimeUnit;
    import java.util.concurrent.atomic.AtomicInteger;
    import java.util.regex.Matcher;
    
    import org.apache.maven.RepositoryUtils;
    Registered: Sun Nov 03 03:35:11 UTC 2024
    - Last Modified: Fri Oct 25 12:31:46 UTC 2024
    - 24.8K bytes
    - Viewed (0)
Back to top