I've got an ISAPI extension that uses the TerminateExtension call to
clean up any threads I've created before exit. My thread clean-up
routine in TerminateExtension can only complete once all threads
created by my extension have stopped. Because of this, it's important
that TerminateExtension is only called when the web server is shutting
down and is therefore not accepting new requests.
I have ISAPI extension caching set to 'on', so I expect that
TerminateExtension is only called when the web server is stopping.
But from a stack dump, it looks like a large number of threads sitting
in my TerminateExtension function even though my web server is not
shutting down at all.
What I'm wondering is: with ISAPI extension caching on, are there
conditinos other than server shut-down under which TerminateExtension
will be executed? Is there a way to ensure that it only gets called
on shut-down?
I'm not overly experienced with web server administration, so any
insight into this would be appreciated. It may be something as simple
as a configuration parameter.
Thanks,
scott