static private Method

AutoRemoval.callback(path, clear)

There's no documentation for this item.

Source Code

# File rio/tempdir.rb, line 70
def self.callback(path, clear)        # :nodoc:
  @@cleanlist << path
  data = [path]
  pid = $$
  return Proc.new {
    if pid == $$ 
      path, tmpfile = *data

      print "removing ", path, "..." if $DEBUG

      tmpfile.close if tmpfile

      # keep this order for thread safeness
      if File.exist?(path)
        clear.call(path)
      end
      @@cleanlist.delete(path)

      print "done\n" if $DEBUG
    end
  }, data
end
Comments

Have your say
Please use Textile formatting (click here for a cheat sheet). Use <code/> and <pre/> for code samples.
Click here to login with OpenID to to post comments.