I'm working on an Objective-C bridge for Pike, and I've got a problem as it relates to threads that I'd like to get some input on. My module wraps Objective-C objects within Pike objects and the other way around. The problem I'm running into is when I try to create threads in Objective-C. I create the thread successfully (using NSThread). The new thread is supposed to run some c code that eventually finds a Pike function to run, pushes its arguments onto the stack, then calls the function with those arguments. When running in Hilfe, everything seems to work fine until I call apply_svalue(). At that point, Pike dies:
Take a look at src/modules/Java/jvm.c:native_dispatch().
Bill