RE: [tcljava-dev] Latest 1.3.0 build and INterp.evalFile()
Brought to you by:
mdejong
From: Mo D. <md...@cy...> - 2001-03-23 09:35:43
|
On Wed, 21 Mar 2001, W. John Guineau wrote: > Hi Mo, > > You mentioned previously on this (or another) list that there were some > problems remaining in 1.3.0 to do with termination? Yeah, I think our multi-threaded startup stuff is ok. It is the shutdown that seems to have problems. > Would that be the assert I'm seeing in the TclBlend.DLL at: > > src/native/javaCmd.c: > > TCLBLEND_EXTERN JNIEnv *JavaGetEnv() > { > ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey); > assert(tsdPtr->initialized); > return tsdPtr->currentEnv; > } > > > It seems to happen when calling Interp.destroy(). Humm, that says to me that the JavaGetEnv() method is getting called after the thread has been cleaned up. Could you provide a nice little test case for this problem? If you really want to lend a hand, designing some test cases that will check the startup and shutdown cases would really help. They are tricky because they are not like any of the other tests. Startup and shutdown tests might need to be run as separate programs before running the normal "make check" rule. > Also - if I have a notifier thread sitting in notifier.doOneEvent(), what's > the recomended way to get it out? Right now, I just send it an empty string > to eval() and that causes the notifier.doOneEvent() while() loop to exit > (taking the thread with it). Do you mean you want to make another thread exit from one that you are in? I think you would to use the Thread package for that. I think you send a thread::exit command to your target thread using the thread::send command. My memory is a little fuzzy in this area so I could be way off. http://dev.scriptics.com/ftp/thread//thread21.html Mo DeJong Red Hat Inc |