Registry / utility / timeout

timeout

JSON →
library0.6.1rbrubygemsunverified

Auto-terminate potentially long-running operations in Ruby.

gem install timeout
INSTALL
IMPORT
SIG · TIMEOUT
T
timeout
utilityrubyv0.6.1
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Timeout
✓ require 'timeout'

Wrap code in a timeout block to abort if it takes too long.

require 'timeout' begin Timeout.timeout(5) do # potentially long operation sleep(10) end rescue Timeout::Error puts "Operation timed out" end
Debug
Known issues
gotchaTimeout may not interrupt all operations (e.g., system calls, blocking I/O) reliably.
fix
Use non-blocking I/O or dedicated timeout mechanisms for specific operations.
affects: >= 0.0.0
Upgrade
Version history
0.6.1latest on RubyGems
Audit
Dependencies

No dependency data recorded yet.

Agent activity
13 hits · last 30 days
node
12
Amazon
1
Resources
timeout — gem install timeout · libregistry