Sha256: b7b30c16e1959ddee55f8836e524e8c4b19116a216a08db40183179c3b75bd86

Contents?: true

Size: 817 Bytes

Versions: 14

Compression:

Stored size: 817 Bytes

Contents

module Pione
  module System
    # Starts finalization process for PIONE system. It collects all pione
    # objects from object space and finalize it.
    # @return [void]
    def finalize
      # finalize all innocent white objects
      ObjectSpace.each_object(PioneObject) do |obj|
        obj.finalize
      end
    end
    module_function :finalize

    # Sets signal trap for the system.
    # @return [void]
    def set_signal_trap
      finalizer = Proc.new { finalize }
      Signal.trap(:INT, finalizer)
    end
    module_function :set_signal_trap

    # Return temporary path of the file.
    #
    # @param filename [String]
    #   the file's name
    # @return [Pathname]
    #  temporary path of the file
    def temporary_path(filename)
      Global.temporary_directory + filename
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
pione-0.5.0 lib/pione/system/common.rb
pione-0.5.0.alpha.2 lib/pione/system/common.rb
pione-0.5.0.alpha.1 lib/pione/system/common.rb
pione-0.4.2 lib/pione/system/common.rb
pione-0.4.1 lib/pione/system/common.rb
pione-0.4.0 lib/pione/system/common.rb
pione-0.3.2 lib/pione/system/common.rb
pione-0.3.1 lib/pione/system/common.rb
pione-0.3.0 lib/pione/system/common.rb
pione-0.2.2 lib/pione/system/common.rb
pione-0.2.1 lib/pione/system/common.rb
pione-0.2.0 lib/pione/system/common.rb
pione-0.1.4 lib/pione/system/common.rb
pione-0.1.3 lib/pione/system/common.rb