GCJ + Roguewave Threads?

Bryce McKinlay mckinlay@redhat.com
Mon Feb 14 16:53:00 GMT 2005


On 11-Feb-05, at 7:37 PM, Johann Hibschman wrote:
> On 2005年2月11日 13:29:45 -0500, Bryce McKinlay 
> <mckinlay@redhat.com> wrote:
>>> My hair-brained scheme for tomorrow is to see if I can launch a
>>> proper, GC-registered pthread from the main thread, and then use that
>>> thread for all subsequent gcj work, leaving the Rogue Wave threads to
>>> do their dirty business in the original thread.
>>>>> Seems reasonable - just be sure to synchronize the threads correctly 
>> if
>> you take this route.
>> Well, I can't seem to get it to work. After I initialize the JVM, all
> subsequent calls to pthread_exit(NULL) simply hang.

Is there any reason why you need to call pthread_exit()? I suggest:
- Don't call pthread_exit
- Only JvAttach/JvDetachThread the thread which will be making Java 
calls, not your main thread
- pthread_join the Java thread you created
Be warned that creating short lived threads very often might be slow!
Regards
Bryce


More information about the Java mailing list

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