From: Kevin Smith Date: 2000-12-13T12:20:39+09:00 Subject: [ruby-talk:7128] Re: fork - or threading problems >>So my suggestion would be that fork would take a parameter >>indicating whether to bring all threads along, or none. Seems simple. > >I suggest that there isn't a good way to combine Ruby's >threading model with Unix forks. They just don't mix very >well. Well some problems have no good solutions, and the >correct solution is education, not trying to let people do >what they probably shouldn't. > >In that spirit, I suggest creating a trappable exception for >attempting to fork while multiple threads are open without >saying that you really wanted to do that. If they fork >anyways, you at least know they were warned. Then for the >benefit of threading offer an optional argument to Thread.new >for a new thread which should actually be launched in a new >process. It still seems like 80% of the time, the decision should be made by the fork, and not by the thread. Perhaps it's just me. Kevin