- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 119 for sleeps (0.06 sec)
-
mockwebserver/src/main/kotlin/mockwebserver3/internal/MockWebServerSocket.kt
} fun shutdownOutput() { javaNetSocket.shutdownOutput() } /** Sleeps [nanos], throwing if the socket is closed before that period has elapsed. */ fun sleepWhileOpen(nanos: Long) { var ms = nanos / 1_000_000L val ns = nanos - (ms * 1_000_000L) while (ms > 100) { Thread.sleep(100) if (javaNetSocket.isClosed) throw InterruptedIOException("socket closed") ms -= 100L
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Thu Jul 31 04:18:40 UTC 2025 - 3.3K bytes - Viewed (0) -
mockwebserver/src/main/kotlin/mockwebserver3/internal/ThrottledSink.kt
* See the License for the specific language governing permissions and * limitations under the License. * */ package mockwebserver3.internal import okio.Buffer import okio.Sink /** * A sink that sleeps [periodDelayNanos] every [bytesPerPeriod] bytes. Unlike [okio.Throttler], * this permits any interval to be used. */ internal class ThrottledSink( private val socket: MockWebServerSocket, private val delegate: Sink,
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Tue Jul 29 12:43:16 UTC 2025 - 1.5K bytes - Viewed (0) -
src/main/java/org/codelibs/fess/auth/chain/CommandChain.java
} } currentProcess = null; } } /** * Monitor thread that handles process timeout and termination. * This thread sleeps for the specified timeout duration and terminates the process if it hasn't finished. */ protected static class MonitorThread extends Thread { /** The process to monitor. */
Registered: Thu Sep 04 12:52:25 UTC 2025 - Last Modified: Thu Jul 17 08:28:31 UTC 2025 - 13.1K bytes - Viewed (0) -
android/guava/src/com/google/common/util/concurrent/Uninterruptibles.java
} } finally { if (interrupted) { Thread.currentThread().interrupt(); } } } // TODO(user): Support Sleeper somehow (wrapper or interface method)? /** * Invokes {@code unit.}{@link TimeUnit#sleep(long) sleep(sleepFor)} uninterruptibly. * * @since 33.4.0 (but since 28.0 in the JRE flavor) */ @J2ktIncompatible @GwtIncompatible // concurrency
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Thu Aug 07 16:05:33 UTC 2025 - 19.8K bytes - Viewed (0) -
okhttp/src/jvmTest/kotlin/okhttp3/ConnectionReuseTest.kt
val request = Request(server.url("/")) val response1 = client.newCall(request).execute() assertThat(response1.body.string()).isEqualTo("a") // Give the thread pool a chance to evict. Thread.sleep(500) val response2 = client.newCall(request).execute() assertThat(response2.body.string()).isEqualTo("b") assertThat(server.takeRequest().exchangeIndex).isEqualTo(0)
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Fri Jun 20 11:46:46 UTC 2025 - 12.2K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/util/concurrent/RateLimiterTest.java
} /** * The stopwatch gathers events and presents them as strings. R0.6 means a delay of 0.6 seconds * caused by the (R)ateLimiter U1.0 means the (U)ser caused the stopwatch to sleep for a second. */ static class FakeStopwatch extends SleepingStopwatch { long instant = 0L; final List<String> events = new ArrayList<>(); @Override public long readMicros() {
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Mon Aug 11 19:31:30 UTC 2025 - 21.9K bytes - Viewed (0) -
guava-tests/test/com/google/common/util/concurrent/RateLimiterTest.java
} /** * The stopwatch gathers events and presents them as strings. R0.6 means a delay of 0.6 seconds * caused by the (R)ateLimiter U1.0 means the (U)ser caused the stopwatch to sleep for a second. */ static class FakeStopwatch extends SleepingStopwatch { long instant = 0L; final List<String> events = new ArrayList<>(); @Override public long readMicros() {
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Mon Aug 11 19:31:30 UTC 2025 - 21.9K bytes - Viewed (0) -
okhttp/src/jvmTest/kotlin/okhttp3/internal/http/ThreadInterruptTest.kt
} private fun sleep(delayMillis: Int) { try { Thread.sleep(delayMillis.toLong()) } catch (e: InterruptedException) { Thread.currentThread().interrupt() } } private fun interruptLater(delayMillis: Int) { val toInterrupt = Thread.currentThread() val interruptingCow = Thread { sleep(delayMillis) toInterrupt.interrupt()
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Sat Aug 30 11:30:11 UTC 2025 - 6.1K bytes - Viewed (0) -
src/test/java/org/codelibs/fess/helper/ProcessHelperTest.java
assertTrue(processHelper.isProcessRunning()); // Wait a bit for the processes to start Thread.sleep(50); // Destroy all processes processHelper.destroy(); // Wait a bit for destruction to complete Thread.sleep(100); assertFalse(processHelper.isProcessRunning()); } catch (Exception e) {
Registered: Thu Sep 04 12:52:25 UTC 2025 - Last Modified: Sat Jul 12 05:35:01 UTC 2025 - 15.1K bytes - Viewed (0) -
src/main/java/org/codelibs/core/lang/ThreadUtil.java
} /** * Causes the currently executing thread to sleep (temporarily cease execution) for the specified number of milliseconds. * * @param millis * the length of time to sleep in milliseconds * @throws InterruptedRuntimeException * if any thread has interrupted the current thread. */ public static void sleep(final long millis) { if (millis < 1L) { return;
Registered: Fri Sep 05 20:58:11 UTC 2025 - Last Modified: Thu Jul 31 08:16:49 UTC 2025 - 2.3K bytes - Viewed (0)