Search Options

Results per page
Sort
Preferred Languages
Advance

Results 31 - 40 of 1,170 for executer (0.2 sec)

  1. okhttp/src/main/kotlin/okhttp3/internal/concurrent/TaskQueue.kt

              return block()
            }
          },
          delayNanos,
        )
      }
    
      /**
       * Executes [block] once on a task runner thread.
       *
       * TODO: make this inline once this is fixed: https://github.com/oracle/graal/issues/3466
       */
      fun execute(
        name: String,
        delayNanos: Long = 0L,
        cancelable: Boolean = true,
        block: () -> Unit,
      ) {
        schedule(
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 7.5K bytes
    - Viewed (0)
  2. container-tests/src/test/java/okhttp3/containers/BasicLoomTest.kt

            )
            .respond(response().withBody("Peter the person!"))
    
          val results =
            (1..20).map {
              executor.submit {
                val response =
                  client.newCall(Request((mockServer.secureEndpoint + "/person?name=peter").toHttpUrl())).execute()
    
                val body = response.body.string()
                assertThat(body).contains("Peter the person")
              }
            }
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Apr 06 11:15:46 GMT 2024
    - 3.7K bytes
    - Viewed (0)
  3. android/guava/src/com/google/common/util/concurrent/ServiceManager.java

       * one of the listener's callbacks will execute at once. However, multiple listeners' callbacks
       * may execute concurrently, and listeners may execute in an order different from the one in which
       * they were registered.
       *
       * <p>RuntimeExceptions thrown by a listener will be caught and logged. Any exception thrown
       * during {@code Executor.execute} (e.g., a {@code RejectedExecutionException}) will be caught and
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Dec 13 19:45:20 GMT 2023
    - 30.5K bytes
    - Viewed (0)
  4. samples/crawler/src/main/java/okhttp3/sample/Crawler.java

      }
    
      private void parallelDrainQueue(int threadCount) {
        ExecutorService executor = Executors.newFixedThreadPool(threadCount);
        for (int i = 0; i < threadCount; i++) {
          executor.execute(() -> {
            try {
              drainQueue();
            } catch (Exception e) {
              e.printStackTrace();
            }
          });
        }
        executor.shutdown();
      }
    
      private void drainQueue() throws Exception {
    Java
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Thu Aug 12 07:26:27 GMT 2021
    - 4.6K bytes
    - Viewed (0)
  5. android/guava/src/com/google/common/util/concurrent/SimpleTimeLimiter.java

    public final class SimpleTimeLimiter implements TimeLimiter {
    
      private final ExecutorService executor;
    
      private SimpleTimeLimiter(ExecutorService executor) {
        this.executor = checkNotNull(executor);
      }
    
      /**
       * Creates a TimeLimiter instance using the given executor service to execute method calls.
       *
       * <p><b>Warning:</b> using a bounded executor may be counterproductive! If the thread pool fills
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Jun 27 14:21:11 GMT 2023
    - 9.7K bytes
    - Viewed (0)
  6. android/guava/src/com/google/common/util/concurrent/WrappingExecutorService.java

      /**
       * Wraps a {@code Callable} for submission to the underlying executor. This method is also applied
       * to any {@code Runnable} passed to the default implementation of {@link #wrapTask(Runnable)}.
       */
      protected abstract <T extends @Nullable Object> Callable<T> wrapTask(Callable<T> callable);
    
      /**
       * Wraps a {@code Runnable} for submission to the underlying executor. The default implementation
       * delegates to {@link #wrapTask(Callable)}.
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Apr 04 09:45:04 GMT 2023
    - 5.5K bytes
    - Viewed (0)
  7. tensorflow/c/eager/custom_device_test.cc

      TFE_TensorHandle* var_handle = nullptr;
      int num_retvals = 1;
      executed = false;
      TFE_Execute(op.get(), &var_handle, &num_retvals, status.get());
      ASSERT_TRUE(TF_GetCode(status.get()) == TF_OK) << TF_Message(status.get());
      ASSERT_TRUE(executed);
      auto handle_cleaner = tensorflow::gtl::MakeCleanup(
          [var_handle]() { TFE_DeleteTensorHandle(var_handle); });
    
    C++
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Thu Aug 27 23:39:24 GMT 2020
    - 18.4K bytes
    - Viewed (0)
  8. android/guava/src/com/google/common/util/concurrent/Service.java

       * @param executor the executor in which the listeners callback methods will be run. For fast,
       *     lightweight listeners that would be safe to execute in any thread, consider {@link
       *     MoreExecutors#directExecutor}.
       * @since 13.0
       */
      void addListener(Listener listener, Executor executor);
    
      /**
       * The lifecycle states of a service.
       *
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Apr 04 09:45:04 GMT 2023
    - 10.7K bytes
    - Viewed (0)
  9. okhttp/src/test/java/okhttp3/SocksProxy.kt

     */
    class SocksProxy {
      private val executor = Executors.newCachedThreadPool(threadFactory("SocksProxy"))
      private var serverSocket: ServerSocket? = null
      private val connectionCount = AtomicInteger()
      private val openSockets = Collections.newSetFromMap(ConcurrentHashMap<Socket, Boolean>())
    
      fun play() {
        serverSocket = ServerSocket(0)
        executor.execute {
          val threadName = "SocksProxy ${serverSocket!!.localPort}"
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Thu Apr 11 22:09:35 GMT 2024
    - 7.7K bytes
    - Viewed (0)
  10. android/guava-tests/test/com/google/common/util/concurrent/UninterruptiblesTest.java

        assertInterrupted();
      }
    
      // executor.awaitTermination Testcases
      public void testTryAwaitTerminationUninterruptiblyLongTimeUnit_success() {
        ExecutorService executor = newFixedThreadPool(1);
        requestInterruptIn(500);
        executor.execute(new SleepTask(1000));
        executor.shutdown();
        assertTrue(awaitTerminationUninterruptibly(executor, LONG_DELAY_MS, MILLISECONDS));
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Feb 09 22:57:07 GMT 2022
    - 30.9K bytes
    - Viewed (0)
Back to top