D
Demonic Software
Hello,
I was wondering if someone could help me with extending the Threads
class. I am trying to do something like the following
The behavior I expect is foo.start() will call foo.run(). I have been
trying to figure this out for a few hours, and I have not had any luck.
I am mostly a Python programmer, and I am applying what I have learned
in that language.
Thanks in advance.
I was wondering if someone could help me with extending the Threads
class. I am trying to do something like the following
Code:
class foo < Thread
def run
puts 'Here I am, over here! uuh, uuh me, pick me!'
another_method()
end
def another_method()
puts 'Something interesting'
end
end
t = foo.new()
t.start()
The behavior I expect is foo.start() will call foo.run(). I have been
trying to figure this out for a few hours, and I have not had any luck.
I am mostly a Python programmer, and I am applying what I have learned
in that language.
Thanks in advance.