Skip to content

Instantly share code, notes, and snippets.

@ledestin
Created November 14, 2014 04:16
require 'thread'
class A
def initialize
#Thread.new { foo }
ObjectSpace.define_finalizer self, proc { puts 'yes' }
end
def foo
sleep
end
end
A.new
GC.start
sleep 0.1 until false
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment