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.
20 21 22 |
# File 'lib/async/deadline.rb', line 20 def self.expired? true end |
.remaining ⇒ Object
Get the remaining time.
26 27 28 |
# File 'lib/async/deadline.rb', line 26 def self.remaining 0 end |