On Tuesday 23 April 2002 19:22, you wrote: > Hi, can you upload the patch to Source Forge?
Of course. > Is this patch something that > makes it so AOLserver uses the traditional Tcl way of doing dlopen() and > running Modulename_Init instead of us doing Ns_ModuleInit jobbage or are we > talking about something else? > No, I'm talking about something else... What I'm talking about is the mechanism the AOLserver is using to copy introspected Tcl command structures from the initial to the connection interpreter(s). The problem is: some Tcl commands may register delete callbacks, which are naively copied to every connection-thread interpreter by the AOLserver code in nsd/tclinit.c This of course results in memory trashing when all those (copied) commands are getting deleted on thread-exit. At that time, all their delete-callbacks are triggered, which may (and do) step on each other toes = memory trash. One of the solutions (which I made in the patch) was to *disable* auto-copying of commands with registered delete-callbacks. In order to handle those, however, I allowed the Tcl exension writer to register his *_Init procedure to be ran each time when the connection interpreter gets initialized. This is how the current Tcl thread extension works. IIRC, Jim (Davidson) made a note about this behaviour/problem in his presentations on the 7th Annual Tcl/Tk Conference (I may be wrong, though). I will post the patch for 3.4-series AOLserver to the SF repository. I'll try to get it for the 4.x as well. Cheers Zoran