From: Charles Oliver Nutter Date: 2008-03-22T14:55:19+09:00 Subject: Re: Thread#raise, Thread#kill, and timeout.rb are unsafe ara howard wrote: > > On Mar 17, 2008, at 10:30 AM, MenTaLguY wrote: > >> In a language with side-effects, I've become convinced that the only safe >> way to handle asynchronous exceptions is for code to be >> uninterruptible by >> default, and only explicitly allow interrupts at specific points (not >> broad >> regions of code). > > no doubt you've read it, but for posterity i'll post it here: > > > http://209.85.207.104/search?q=cache:2T61vSNQ4_EJ:home.pacbell.net/ouster/threads.pdf+%22why+threads+are+a+bad+idea%22&hl=en&ct=clnk&cd=3&gl=us&client=firefox-a I don't think we'll get anywhere solving the problem by saying "let's just remove threads" or "don't use threads". Threads are hard, yes. Threads are too hard for most programmers, yes. But since they're in Ruby, they're going to get used...and providing provably unsafe operations on threads is obviously not making matters better. Besides, even if *you* avoid using threads, the libraries you call might not. So we need a global answer. - Charlie