On 9/20/07, Wayne E. Seguin <wayneeseguin / gmail.com> wrote:
> On Sep 19, 2007, at 17:15 , Joel VanderWerf wrote:
> > ...except when you call back into ruby from your C code (right?).
> > Then the thread scheduler could get a chance to do its thing.
> Joel,
>
> Thank you for the response.
>
> How do you call back? Is that the rb_thread_schedule() method?

Or rb_funcall(). Basically any call that executes ruby code.

Ran into an "interesting" bug with a C extension once with
this: I used a global scratchpad on the C side and did ruby calls
from C to log stuff. Which let other ruby threads hit the C side and
screw up the scratchpad. Resulting in some messed up images.