Project

General

Profile

« Previous | Next » 

Revision a68331e7

Added by peterzhu2118 (Peter Zhu) 9 months ago

[ruby/tempfile] Add FinalizerManager to manage finalizers

As @jeremyevans pointed out for commit eb2d8b1:

Each Tempfile instance has a separate File instance and file descriptor:

t = Tempfile.new
t.to_i # => 6
t.dup.to_i => 7

FinalizerManager will keep track of the open File objects for the
particular file and will only unlink the file when all of the File objects
have been closed.

https://github.com/ruby/tempfile/commit/753ab16642