Re: Subclassing Thread?
- From: Stephen Ware <sgware@xxxxxxxxx>
- Date: Mon, 1 Oct 2007 02:14:17 +0900
Kero wrote:
The usual question is, why would you want that?
A Thread, by its nature, is something that should be running.
Especially delaying the start means... there's no underlying thread yet!
My motivation for wanting the thread in a separate class is simply
convenience. The class will be very large... several pages of code at
least... so putting it into a block would be a little unwieldy.
Thanks very much for your suggestions. I've found another method that
seems to work well also. Rather than subclassing Thread, I have written
the class (call it "User") as a normal class and done this:
Thread.new(args){|args| User.new(args)}
That seems to accomplish what I'm going for.
Thanks for your help!
--
Posted via http://www.ruby-forum.com/.
.
- References:
- Subclassing Thread?
- From: Stephen Ware
- Re: Subclassing Thread?
- From: 7stud --
- Re: Subclassing Thread?
- From: Kero
- Subclassing Thread?
- Prev by Date: Re: Regular Expression newbie question about upper & lower c
- Next by Date: Re: a = Dog.new # a is not a pointer and not a reference?
- Previous by thread: Re: Subclassing Thread?
- Next by thread: Re: Subclassing Thread?
- Index(es):
Relevant Pages
|