From: MikkelFJ Date: 2001-12-04T18:42:56+09:00 Subject: [ruby-talk:27424] Re: thoughts for future Ruby with bytecode VM "Neil Hodgson" wrote in message news:6MUO7.410494$bY5.1730226@news-server.bigpond.net.au... > MikkelFJ: > > > One of the (theoretic?) features of Stackless Python continuations is that > > you can suspend a point of execution and resume it somewhere else. > > This works really nicely for pure Python but if you have C extension > stack frames then they are hard to wrap up and remote. External resources > such as open files and OS level semaphores need special treatment or at > least a decent exception. I agree - I was actually about to reply to myself to make that point. Also, Ruby already has lightweight threads. Still, the concepts are worth exploring. It may be possible with cooperation from the C > extension and a stack frame wrapping API. This was explored a bit at the > last Python conference where the stackless features were ranked from easy to > hard and only the easiest, simple generators ("yield"), was implemented in > core Python. Matz also mentions that problems with callbacks from external threads back into Ruby. This is a realistic scenario, for instance in some GUI applications. However, I think this is an issue that can be solved without sacrificing the benefits of Ruby-threads. COM singlethreaded apartments deals with similar problems. MikkelFJ