Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 2,328 for executors (0.15 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. samples/guide/src/main/java/okhttp3/recipes/CancelCall.java

    package okhttp3.recipes;
    
    import java.io.IOException;
    import java.util.concurrent.Executors;
    import java.util.concurrent.ScheduledExecutorService;
    import java.util.concurrent.TimeUnit;
    import okhttp3.Call;
    import okhttp3.OkHttpClient;
    import okhttp3.Request;
    import okhttp3.Response;
    
    public class CancelCall {
      private final ScheduledExecutorService executor = Executors.newScheduledThreadPool(1);
    Registered: Sun Jun 16 04:42:17 UTC 2024
    - Last Modified: Sat Jan 12 03:31:36 UTC 2019
    - 2.1K bytes
    - Viewed (0)
  8. guava-tests/test/com/google/common/util/concurrent/ExecutionListTest.java

    import static com.google.common.util.concurrent.MoreExecutors.directExecutor;
    
    import com.google.common.testing.NullPointerTester;
    import java.util.concurrent.CountDownLatch;
    import java.util.concurrent.Executor;
    import java.util.concurrent.Executors;
    import java.util.concurrent.TimeUnit;
    import java.util.concurrent.atomic.AtomicInteger;
    import junit.framework.TestCase;
    
    /**
     * Unit tests for {@link ExecutionList}.
     *
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Wed Feb 09 22:57:07 UTC 2022
    - 4.7K bytes
    - Viewed (0)
  9. 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)
  10. 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)
Back to top