Sha256: 1e7c8e7f69b854b93bf615fc60b272341ebca3784b2818c64640c1553a7a357e

Contents?: true

Size: 410 Bytes

Versions: 22

Compression:

Stored size: 410 Bytes

Contents

# frozen_string_literal: true

export  :stat,
        :read

require 'fileutils'

ThreadPool = import('./core/thread_pool')

::File.singleton_class.instance_eval do
  alias_method :orig_stat, :stat
  def stat(path)
    ThreadPool.process { orig_stat(path) }
  end
end

::IO.singleton_class.instance_eval do
  alias_method :orig_read, :read
  def read(path)
    ThreadPool.process { orig_read(path) }
  end
end

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
polyphony-0.36 lib/polyphony/adapters/fs.rb
polyphony-0.34 lib/polyphony/adapters/fs.rb
polyphony-0.33 lib/polyphony/adapters/fs.rb
polyphony-0.32 lib/polyphony/adapters/fs.rb
polyphony-0.31 lib/polyphony/adapters/fs.rb
polyphony-0.30 lib/polyphony/fs.rb
polyphony-0.29 lib/polyphony/fs.rb
polyphony-0.28 lib/polyphony/fs.rb
polyphony-0.27 lib/polyphony/fs.rb
polyphony-0.26 lib/polyphony/fs.rb
polyphony-0.25 lib/polyphony/fs.rb
polyphony-0.24 lib/polyphony/fs.rb
polyphony-0.23 lib/polyphony/fs.rb
polyphony-0.22 lib/polyphony/fs.rb
polyphony-0.21 lib/polyphony/fs.rb
polyphony-0.20 lib/polyphony/fs.rb
polyphony-0.19 lib/polyphony/fs.rb
polyphony-0.17 lib/polyphony/fs.rb
polyphony-0.16 lib/polyphony/fs.rb
polyphony-0.15 lib/polyphony/fs.rb