From: Sam Roberts Date: 2005-05-21T07:07:25+09:00 Subject: Re: Web services and Ruby Quoting luke@madstop.com, on Sat, May 21, 2005 at 04:57:29AM +0900: > On Sat, 21 May 2005, Sam Roberts wrote: > > >Whats wrong with threads? Its a good answer. > > Well, there are at least two problems with threads: I've never done them > before and I hope not to have to learn them just to do this relatively > simple piece, and second they do add another dimension of complexity, one > which I must always be at least somewhat aware. Given that, as I > mentioned, I'm a newbie to threads, this does not fill me with confidence. I was worried about threads, too, then I found they are trivial. You'll just need two, I guess, and the data thats shared between them should all be one place (good design), and you just wrap that with a Mutex. If really should be easy. > >Taking a guess, in case you are worried, they aren't real threads, its > >just a very nice wrapper around select(). > > Yah, I know that they aren't real threads, but I believe they still come > with some of the problems that I would have with real threads. Yeah, but doing things other ways has problems, too, and this way is well supported in ruby. Have fun, Sam