From: Nat Pryce Date: 2001-11-07T22:47:10+09:00 Subject: [ruby-talk:24513] Re: callback/event <-> threads Ruby uses user-space threads. This makes the thread approach to IO much more efficient than it would be with operating-system threads. The implementation of Ruby's thread scheduler uses the event loop approach (select or poll) to handle IO events and makes lightweight threads runnable instead of invoking callbacks. This way you get a cleaner programming model with only a small runtime overhead. Cheers, Nat. ----- Original Message ----- From: "Jef Peeraer" Newsgroups: comp.lang.ruby To: "ruby-talk ML" ; Sent: Wednesday, November 07, 2001 8:41 AM Subject: [ruby-talk:24492] callback/event <-> threads > Hello, > > i just wanted to check some things before i dive deeper into ruby, which > drew my attention already a couple of years ago. For the moment, i > program in perl ( i have to ). We have a huge application over here > (telecom bussiness) , and one of my major remarks is the readibility of > the code + weak OO features in perl. At the other hand, for all io, we > are using this callback/event loop programming paradigm, and i must say, > it works great, no hasles about deadlocked threads, mutexes, etc... > I have the impression that ruby prefers the threading-model. Can i still > use my event/callback stuff ? Is there a reason why the threading model > is preferred over callback/event in ruby ? > > Thanx > > > Jef >