From: Marc Butler Date: 2001-04-10T06:57:06+09:00 Subject: [ruby-talk:13586] Re: Wrapping library that uses pthread Danny van Bruggen wrote: > Hello all, > > I'm writing a Ruby interface for SDL, but I can't go on right now because > SDL uses pthreads. When I run a Ruby-script on a platform with pthread > support, it will wait forever with a blocking thread. Is anything known > about Ruby that might cause this? > > Dag Allemaal! The ruby interpreter is not thread safe. If you are accessing it from multiple threads the results will be unpredictable. You may want to isolate the interpreter in a thread by itself and manage access to it using semaphores/mutexes. -Marc. -- Apathy: a cynics best friend. mlb@noworkingparts.com