2
Class A
def foo
do s.t
end
end
class B
def initialize
@bar = Thread::new{
A::new
}
#Here I want to call A.foo in the thread @bar
end
end
bar = B::new
我想用类A启动一个新线程。如何从类B调用方法foo?调用线程中的类的方法