From: rex goxman Date: 2012-07-06T21:40:43+09:00 Subject: Re: Green threads in 1.9.* ? Robert Klemme wrote in post #1067663: > So far rex provides a solution he wants > to use but I cannot really see the reasoning behind it. *Sigh*. I did not provide a "solution I want to use." I provided a CRAPPY EXAMPLE off the top of my head that was advertised as a CRAPPY EXAMPLE before giving the CRAPPY EXAMPLE. I do not intend to divulge any real use cases for green threads because they are intuitively obvious, apparent, easy to find or dream up for one's self, and the literature is abundant and easily available. It's sort of like being asked to give a use case for a hammer. I'm not here to educate. If people want education, it's up to them to get it, not up to me to provide it. Use cases for green threads aren't controversial, and there is no debate on it anywhere that I'm aware of... except perhaps here I guess. I don't intend to debate whether or not green threads can be a good thing and whether there are many use cases for them any more than I wish to debate whether 2 + 2 = 4. Now, whether Ruby wants to deploy and maintain a green threads solution or not is another issue entirely, completely separate from the issue of whether "green threads are good," or "green threads have many valid use cases." The answers to the latter two issues are an unequivocal 'yes.' The answer to the former could be anything, and rightly or wrongly so. Ruby might have good reasons or not so good reasons for wanting or not wanting to maintain green threads. I don't care, and I'm not here to comment on that either way. While I did say I was somewhat surprised that Ruby would ditch green threads altogether vs. keeping them around and deploying kernel threads alongside, there may very well be good reasons for such a decision, not least of which may simply be limited resources to devote to a threading implementation, and thus a need to simply pick one and go with it (just a guess). > And from a global perspective > which covers operating system as well as hardware trends Matz's > decision to go for kernel threads is wise because that will eventually > give us better performance (once GIL is gone). Perhaps I have a clue here as to some of the... "interesting" responses I have received on this. Perhaps it's a classic case of an "outsider" being perceived as coming into a community and criticizing the leader of the community. If so, let me be clear. I have said nothing regarding Matz, nor of his decision to go for kernel threads, nor the wisdom of that decision. Whether green threads are "good" or not, and whether Matz made a wise decision in ditching them for kernel threads, is two separate issues. In other words, it is possible that "green threads are good" and "Matz made a great decision and is a genius" are both true. -- Posted via http://www.ruby-forum.com/.