RE: [xml] Windows threading issues

Does anyone have a copy of Eugene's patch?  He hasn't responded to a message
I sent several days ago.

-----Original Message-----
From: Stéphane Bidoul [mailto:stephane bidoul softwareag com] 
Sent: Friday, July 11, 2003 5:11 AM
To: 'Jesse Pelton'
Cc: xml gnome org
Subject: RE: [xml] Windows threading issues

I'm CC'ing the list, because other can help too.

-----Original Message-----
From: Jesse Pelton [mailto:jsp PKC com]
Sent: 10 July, 2003 21:56
To: 'Stéphane Bidoul'
Subject: RE: [xml] Windows threading issues

Thanks for pointing out Eugene's message; I wish I'd seen it
earlier.  (I
only recently realized that I was subscribed to libxslt but
not libxml.)
His summary of the situation pretty much covers the bases.
My situation is
slightly different - I recently figured out that DllMain()
never gets called
with DLL_THREAD_DETACH, presumably because IIS terminates its
threads with
TerminateThread() - but it's the same basic problem.  
Neither approach
(watchdog thread or DllMain()) solves the problem, despite 
my earlier
optimism about the second one.

If IIS is really doing TerminateThread, you're in trouble, indeed:
you'll get memory leaks each time a thread terminates.

Perhaps it would make more sense for xmlCleanupThreads() to
release the
thread-local data.  I'm already calling xlmCleanupParser(),
which then calls
xmlCleanupThreads(), so this would allow a clean exit.  The
trouble is, I
don't see a good architecture.  I think there'd have to be an
application-global list of thread data.  Access to this list
would have to
be synchronized, with possibly significant performance

Eugene's patch is doing just that. I don't think there
are performance issue (access to the synchronized list is
only during thread creation and termination).
It's probably a good starting point.

just muttering out loud here, and hoping that something
workable will come
to me in my dreams tonight.  If not, I can probably use
Eugene's approach,
but I'd like to come up with a general solution.  Right now
my head hurts
and I'm going home.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]