Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 17 for threadFactory (0.07 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();
    Registered: Fri Dec 26 12:43:10 UTC 2025
    - Last Modified: Fri Dec 12 00:25:21 UTC 2025
    - 26.5K bytes
    - Viewed (0)
  2. 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 Dec 26 12:43:10 UTC 2025
    - Last Modified: Fri Dec 12 00:25:21 UTC 2025
    - 26.5K bytes
    - Viewed (0)
  3. okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/-UtilJvm.kt

    import okio.Source
    
    /** 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 Dec 26 11:42:13 UTC 2025
    - Last Modified: Thu Jul 31 04:18:40 UTC 2025
    - 10.2K bytes
    - Viewed (1)
  4. okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/concurrent/TaskRunner.kt

        )
      }
    
      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 Dec 26 11:42:13 UTC 2025
    - Last Modified: Sat Aug 30 11:30:11 UTC 2025
    - 10.4K bytes
    - Viewed (0)
  5. src/main/java/jcifs/util/ResourceManager.java

            }
        }
    
        private ResourceManager() {
            ThreadFactory threadFactory = r -> {
                Thread t = new Thread(r, "ResourceManager-Cleanup");
                t.setDaemon(true);
                return t;
            };
            cleanupExecutor = Executors.newSingleThreadScheduledExecutor(threadFactory);
    
            // Add shutdown hook for cleanup
    Registered: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Sat Aug 30 05:58:03 UTC 2025
    - 16.2K bytes
    - Viewed (0)
  6. okhttp-testing-support/src/main/kotlin/okhttp3/internal/concurrent/TaskFaker.kt

    import java.util.AbstractQueue
    import java.util.concurrent.BlockingQueue
    import java.util.concurrent.Executors
    import java.util.concurrent.TimeUnit
    import java.util.logging.Logger
    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 Dec 26 11:42:13 UTC 2025
    - Last Modified: Wed May 28 23:28:25 UTC 2025
    - 11.9K bytes
    - Viewed (0)
  7. okhttp/src/commonJvmAndroid/kotlin/okhttp3/Dispatcher.kt

    import okhttp3.internal.assertLockNotHeld
    import okhttp3.internal.connection.RealCall
    import okhttp3.internal.connection.RealCall.AsyncCall
    import okhttp3.internal.okHttpName
    import okhttp3.internal.threadFactory
    import okhttp3.internal.unmodifiable
    
    /**
     * Policy on when async requests are executed.
     *
     * Each dispatcher uses an [ExecutorService] to run calls internally. If you supply your own
    Registered: Fri Dec 26 11:42:13 UTC 2025
    - Last Modified: Tue Oct 07 14:16:22 UTC 2025
    - 9.9K bytes
    - Viewed (0)
  8. 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 = getPlatformSystemProperty() == LOOM_PROPERTY
    
    Registered: Fri Dec 26 11:42:13 UTC 2025
    - Last Modified: Tue Nov 04 19:13:52 UTC 2025
    - 10.8K 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 Dec 26 12:43:10 UTC 2025
    - Last Modified: Tue Sep 23 17:50:58 UTC 2025
    - 21.4K bytes
    - Viewed (0)
  10. guava/src/com/google/common/util/concurrent/MoreExecutors.java

    import java.util.concurrent.ThreadFactory;
    import java.util.concurrent.ThreadPoolExecutor;
    import java.util.concurrent.ThreadPoolExecutor.CallerRunsPolicy;
    import java.util.concurrent.TimeUnit;
    import java.util.concurrent.TimeoutException;
    import org.jspecify.annotations.Nullable;
    
    /**
     * Factory and utility methods for {@link Executor}, {@link ExecutorService}, and {@link
     * ThreadFactory}.
     *
     * @author Eric Fellheimer
    Registered: Fri Dec 26 12:43:10 UTC 2025
    - Last Modified: Wed Oct 08 18:55:33 UTC 2025
    - 45.2K bytes
    - Viewed (0)
Back to top