Sha256: 21f507fb33864840be490932c9c66c5a7aedac8e02e098bcbadc4763287f936d

Contents?: true

Size: 168 Bytes

Versions: 4

Compression:

Stored size: 168 Bytes

Contents

module Kernel
  def pause(s, &block)
    Promise.new.tap { |p| after(s) { p.resolve(*(block && [block.call])) }}
  end
  alias busy_sleep sleep
  alias sleep pause
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
hyper-component-1.0.alpha1.8 lib/hyperstack/ext/component/kernel.rb
hyper-component-1.0.alpha1.7 lib/hyperstack/ext/component/kernel.rb
hyper-component-1.0.alpha1.6 lib/hyperstack/ext/component/kernel.rb
hyper-component-1.0.alpha1.5 lib/hyperstack/ext/component/kernel.rb