Module: Corkscrews::Primitives::QueueStamp
- Defined in:
- lib/corkscrews/primitives.rb
Instance Method Summary collapse
Instance Method Details
#<< ⇒ Object
37 38 39 |
# File 'lib/corkscrews/primitives.rb', line 37 def <<(...) push(...) end |
#deq ⇒ Object
59 60 61 |
# File 'lib/corkscrews/primitives.rb', line 59 def deq(...) pop(...) end |
#pop ⇒ Object
50 51 52 53 54 55 56 57 |
# File 'lib/corkscrews/primitives.rb', line 50 def pop(...) Corkscrews::Native.stamp_write(self) started_ns = Corkscrews::TimeSource.monotonic_ns result = super Corkscrews.record_wait(:queue_wait, Corkscrews::TimeSource.monotonic_ns - started_ns) Corkscrews::Native.stamp_inherit(self) result end |
#push ⇒ Object
41 42 43 44 45 46 47 48 |
# File 'lib/corkscrews/primitives.rb', line 41 def push(...) Corkscrews::Native.stamp_write(self) started_ns = Corkscrews::TimeSource.monotonic_ns result = super Corkscrews.record_wait(:queue_wait, Corkscrews::TimeSource.monotonic_ns - started_ns) Corkscrews::Native.stamp_inherit(self) result end |