Sha256: ce7621b4671a952d2500df78e2153715a8f7930fc53092b246bd93646a0fdbc0
Contents?: true
Size: 421 Bytes
Versions: 70
Compression:
Stored size: 421 Bytes
Contents
# frozen_string_literal: true require 'polyphony' require 'readline' # 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 Worker = Polyphony::ThreadPool.new(1) def readline(*args) Worker.process { orig_readline(*args) } end end
Version data entries
70 entries across 70 versions & 1 rubygems