Asp Forum
Home
|
Login
|
Register
|
Search
Forums
>
comp.lang.ruby
Extending the Threads Class
Demonic Software
3/3/2008 2:24:00 AM
Hello,
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()
[/code]
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.
--
Posted via
http://www.ruby-...
.
1 Answer
Demonic Software
3/3/2008 3:12:00 AM
0
Nevermind I think I found what I am looking for here:
http://www.ruby-...
topic/...
--
Posted via
http://www.ruby-...
.
Servizio di avviso nuovi messaggi
Ricevi direttamente nella tua mail i nuovi messaggi per
Extending the Threads Class
Inserendo la tua e-mail nella casella sotto, riceverai un avviso tramite posta elettronica ogni volta che il motore di ricerca troverà un nuovo messaggio per te
Il servizio è completamente GRATUITO!
x
Login to ForumsZone
Login with Google
Login with E-Mail & Password