I've been investigating the thread cleanup, and it appears that thread
cleanup handlers created with Tcl_CreateThreadExitHandler are only
called when tcl is shutting down. This is true at least for tcl8.3.2.
I haven't looked at tcl8.4.
There is an experimental tcl thread interface in tcl8.3.2
I was never able to get Tcl_CreateThreadExitHandler to work for either
the TclThreadCleanup or the JavaCacheCleanup routines. As a
work-around I decided to call both of these cleanup routines at the
end of the JavaInterpDeleted function. I've run this setup under
load, and other than leaking