Sha256: 1693170f5185cc7329a0fd19df0448cb3e1490dd623d4f8f3a90044f0f3ca9e6

Contents?: true

Size: 267 Bytes

Versions: 8

Compression:

Stored size: 267 Bytes

Contents

# frozen_string_literal: true

require 'timeout'

# Override Timeout to use cancel scope
module ::Timeout
  def self.timeout(sec, klass = Timeout::Error, message = 'execution expired', &block)
    cancel_after(sec, with_exception: [klass, message], &block)
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
polyphony-0.79 lib/polyphony/extensions/timeout.rb
polyphony-0.78 lib/polyphony/extensions/timeout.rb
polyphony-0.77 lib/polyphony/extensions/timeout.rb
polyphony-0.76 lib/polyphony/extensions/timeout.rb
polyphony-0.75 lib/polyphony/extensions/timeout.rb
polyphony-0.74 lib/polyphony/extensions/timeout.rb
polyphony-0.73.1 lib/polyphony/extensions/timeout.rb
polyphony-0.73 lib/polyphony/extensions/timeout.rb