From: Ammar Ali Date: 2010-11-16T21:10:17+09:00 Subject: Re: Embedding ruby interpreter On Tue, Nov 16, 2010 at 12:24 PM, Steve Hart wrote: > a) The ruby initialisation must be done in main > Is this a change from 1.8.7? What if we are dynamically loaded and have > no access to main? > b) The thread should be created using rb_thread_create > Is this true? If so, why? > c) disabling pthread support when compiling ruby has been deprecated. > What does this mean? - Does ruby use threads itself? > I briefly tried to disable the gc and then got a crash > d) Should we apply the patch from 2294? Unfortunately, I never found a solution. In my situation the problem was exacerbated by the fact that the main program loaded each plug-in into it's own thread. FWIW, I ended up, due to timing constraints, converting the dynamic module into an "agent" that communicated with a separate process, a ruby server written in ruby. Not for every situation, pretty, or efficient, but it bought me some time. When I tired the patch in 2294, it delayed the crash but didn't eliminate it. I see that Suraj has made a few updates since I last tried it. It is worth a try since it worked for some people. I hope to try the latest patch soon and update the issue with my findings. Regards, Ammar