GCJ + Roguewave Threads?

Andi Vajda andi@osafoundation.org
Fri Feb 11 02:39:00 GMT 2005


> Has anyone had experience or gotten GCJ to work with Roguewave threads? 
> I'm trying to get a set of Roguewave threads to attach to the VM via the 
> JvAttachCurrentThread() method and the program seems to crash in the 
> boehm-gc. Alternatively, I've tried to create the VM while in the thread 
> and then attach it, and it crashes in gc_push_all_eager in mark.c, near 
> line 1349. I'm using gcc 3.2.3-42.

I've tried to get something similar to work with threads created by python.
I took the same approach you describe and, with several hacks, got it to work 
reliably only on Mac OS X. On Linux, with a 2.6 kernel, the process is 
instantly killed, and on Windows (with mingw), I was not able to get threads 
unregistered, so the process would crash after 253 or so threads.
Eventually, I realized I was doing it backwards and the new approach I'm 
taking works very well on all 3 operating systems: have python delegate the 
creation and initialization of the thread to libgcj and then have it play 
tricks to make it think it is one of its own. Essentially, I'm creating two 
thread objects, one in python and one in Java, both sharing the same OS 
thread, with the python thread object delegating some essential API calls 
such as start(), join(), etc... to the java thread object.
Andi..


More information about the Java mailing list

AltStyle によって変換されたページ (->オリジナル) /