Sha256: ca166a7e7fea147306f1b7736b4095b56b0c18f75107752813862a939c2e75b2

Contents?: true

Size: 375 Bytes

Versions: 1

Compression:

Stored size: 375 Bytes

Contents

# frozen_string_literal: true

require 'polyphony'

# readline blocks the current thread, so we offload it to the blocking-ops
# thread pool. That way, the reactor loop can keep running while waiting for
# readline to return
module ::Readline
  alias_method :orig_readline, :readline
  def readline(*args)
    Polyphony::ThreadPool.process { orig_readline(*args) }
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
polyphony-0.28 lib/polyphony/irb.rb