Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 2,083 for executors (0.14 sec)

  1. platforms/enterprise/enterprise/src/integTest/groovy/org/gradle/internal/enterprise/GradleEnterprisePluginBackgroundJobExecutorsIntegrationTest.groovy

    
        def "jobs can query if they are running on the background executor"() {
            given:
            buildFile << """
                import ${CompletableFuture.name}
    
                def executors = $executors
                CompletableFuture.runAsync({
                    println "backgroundJobExecutor.isInBackground = \${executors.isInBackground()}"
                }, executors.userJobExecutor).exceptionally { e ->
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu Feb 29 16:27:53 UTC 2024
    - 7K bytes
    - Viewed (0)
  2. platforms/core-runtime/concurrent/src/main/java/org/gradle/internal/concurrent/DefaultExecutorFactory.java

                CompositeStoppable.stoppable(executors).stop();
            } finally {
                executors.clear();
            }
        }
    
        @Override
        public ManagedExecutor create(String displayName) {
            ManagedExecutor executor = new TrackedManagedExecutor(createExecutor(displayName), new ExecutorPolicy.CatchAndRecordFailures());
            executors.add(executor);
            return executor;
        }
    
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu Apr 11 19:07:35 UTC 2024
    - 5.8K bytes
    - Viewed (0)
  3. subprojects/core/src/integTest/groovy/org/gradle/api/invocation/GradleLifecycleUnsupportedTypesIntegrationTest.groovy

            Thread                            | Thread           | "Thread.currentThread()"
            DefaultThreadFactory              | ThreadFactory    | "java.util.concurrent.Executors.defaultThreadFactory()"
            executorServiceTypeOnCurrentJvm() | Executor         | "java.util.concurrent.Executors.newSingleThreadExecutor().tap { shutdown() }"
            ByteArrayInputStream              | InputStream      | "new java.io.ByteArrayInputStream([] as byte[])"
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Wed Apr 17 18:15:52 UTC 2024
    - 4.5K bytes
    - Viewed (0)
  4. platforms/core-runtime/logging/src/integTest/resources/org/gradle/internal/logging/LoggingIntegrationTest/multiThreaded/build.gradle

    import java.util.concurrent.Executors
    import java.util.concurrent.TimeUnit
    import org.gradle.internal.logging.text.StyledTextOutputFactory
    import static org.gradle.internal.logging.text.StyledTextOutput.Style.UserInput
    import static org.gradle.internal.logging.text.StyledTextOutput.Style.Normal
    
    task log {
        doLast {
            def executor = Executors.newCachedThreadPool()
            (1..10).each { thread ->
                executor.execute {
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Fri Sep 22 09:05:18 UTC 2023
    - 1.2K bytes
    - Viewed (0)
  5. platforms/core-runtime/functional/src/test/groovy/org/gradle/internal/lazy/LazyTest.groovy

            def executors = Executors.newFixedThreadPool(concurrency)
            concurrency.times {
                executors.submit {
                    // The barrier ensures that the threads all try to access lazy at nearly the same time
                    barrier.await()
                    total.addAndGet(lazy.get())
                }
            }
            executors.shutdown()
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Fri Sep 22 08:22:02 UTC 2023
    - 5.2K bytes
    - Viewed (0)
  6. guava-testlib/src/com/google/common/util/concurrent/testing/AbstractListenableFutureTest.java

        assertFalse(future.isCancelled());
    
        ExecutorService executor = Executors.newSingleThreadExecutor();
    
        try {
          Future<Boolean> getResult = executor.submit(() -> future.get());
    
          // Release the future value.
          latch.countDown();
    
          assertTrue(getResult.get(10, SECONDS));
        } finally {
          executor.shutdownNow();
        }
    
        assertTrue(future.isDone());
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Wed Sep 06 18:30:30 UTC 2023
    - 6K bytes
    - Viewed (0)
  7. okhttp-android/src/main/kotlin/okhttp3/android/AndroidAsyncDns.kt

      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,
            DnsResolver.FLAG_EMPTY,
            executor,
            null,
            object : DnsResolver.Callback<List<InetAddress>> {
    Registered: Sun Jun 16 04:42:17 UTC 2024
    - Last Modified: Mon Apr 01 10:07:48 UTC 2024
    - 2.8K bytes
    - Viewed (0)
  8. platforms/core-execution/persistent-cache/src/test/groovy/org/gradle/cache/ManualEvictionInMemoryCacheTest.groovy

    import java.util.concurrent.Executors
    import java.util.concurrent.TimeUnit
    import java.util.function.Supplier
    
    class ManualEvictionInMemoryCacheTest extends Specification {
    
        @Timeout(value = 5, unit = TimeUnit.SECONDS)
        def "supports #concurrency concurrent computations"() {
            def latch = new CountDownLatch(concurrency)
            def executor = Executors.newFixedThreadPool(concurrency)
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Fri Sep 22 09:08:47 UTC 2023
    - 1.9K bytes
    - Viewed (0)
  9. samples/guide/src/main/java/okhttp3/recipes/kt/CancelCall.kt

     * limitations under the License.
     */
    package okhttp3.recipes.kt
    
    import java.io.IOException
    import java.util.concurrent.Executors
    import java.util.concurrent.TimeUnit
    import okhttp3.OkHttpClient
    import okhttp3.Request
    
    class CancelCall {
      private val executor = Executors.newScheduledThreadPool(1)
      private val client = OkHttpClient()
    
      fun run() {
        val request =
          Request.Builder()
    Registered: Sun Jun 16 04:42:17 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 1.9K bytes
    - Viewed (0)
  10. guava/src/com/google/common/util/concurrent/JdkFutureAdapters.java

       */
      public static <V extends @Nullable Object> ListenableFuture<V> listenInPoolThread(
          Future<V> future, Executor executor) {
        checkNotNull(executor);
        if (future instanceof ListenableFuture) {
          return (ListenableFuture<V>) future;
        }
        return new ListenableFutureAdapter<>(future, executor);
      }
    
      /**
       * An adapter to turn a {@link Future} into a {@link ListenableFuture}. This will wait on the
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Thu Dec 14 20:35:03 UTC 2023
    - 7.5K bytes
    - Viewed (0)
Back to top