From: Gin Mendi Date: 2009-08-24T18:37:52+09:00 Subject: Re: Ruby/DL - cross-thread violation on rb_thread_schedule() Well been trying to read up on this topic and I found this from a thread(http://programming.itags.org/programming/346457/): "To my knowledge, a cross-thread violation occurs when a piece of code (which exists on a different *stack* altogether, i.e. running within a POSIX or native thread alongside the Ruby interpreter in the same process) makes use of Ruby's C language API. I have encountered this when I was embedding a Ruby interpreter inside a C program. Ruby was running inside a POSIX thread and therefore had its own *stack*. When the C program made use of Ruby's C language API, the entire process would crash with that cross-thread violation error." So does that mean when my DLL library initiates the callback that I pass it runs it in another stack? Would this be causing the error? If so is there a way to have the callback initiated in the same thread as the ruby interpreter? -- Posted via http://www.ruby-forum.com/.