Module: Async::Deadline::Zero
- Defined in:
- lib/async/deadline.rb
Overview
Singleton module for immediate timeouts (zero or negative). Avoids object allocation for fast path (non-blocking) timeouts.
Class Method Summary collapse
-
.expired? ⇒ Boolean
Check if the deadline has expired.
-
.remaining ⇒ Object
Get the remaining time.
Class Method Details
.expired? ⇒ Boolean
Check if the deadline has expired.
19 20 21 |
# File 'lib/async/deadline.rb', line 19 def self.expired? true end |
.remaining ⇒ Object
Get the remaining time.
25 26 27 |
# File 'lib/async/deadline.rb', line 25 def self.remaining 0 end |