From: Edwin Fine Date: 2006-11-24T00:43:14+09:00 Subject: Re: Multi-threaded C++, new, and xmalloc I'm sure you know this, but just in case: the embedded Ruby interpreter does not work well with a multi-threaded application because it has global variables and therefore cannot be re-entrant. Quote: "ruby is not thread-safe. If you embed ruby into a multi-threaded application then you will need to semaphore protect all access to ruby. Warning: Insufficient semaphore protection can be hard debuggable." - http://metaeditor.sourceforge.net/embed/ You would have to somehow organize a separate instance of each Ruby interpreter on a per-thread basis, or have a locking decorator that intercepts all calls to Ruby using a mutex. Or something like that. I believe that Ruby 2 is aiming to overcome the lack of re-entrancy. I wonder when Ruby 2's day will be (sorry, Mick; cringes, ducks and runs). -- Posted via http://www.ruby-forum.com/.