RE: [xml] win32 thread safety patch



My objection is to the thread-per-thread overhead.

Now it's obvious (now I'm a little more awake) that a cached
copy of the
pointer is needed, along with the thread HANDLE from
syncronisation. But
a thread-per thread approach is very wasteful, only one cleanup thread
should be needed.

the solution is very obvious, have some sort of protected queue. then
xmlGlobalStateCleanupHelperParams gets pushed down there from the
xmlGetGlobalState and there is some thread that checks that queue say once
every 5 seconds or so and cleans up all stuff in queue for threads that are
dead. i'll come around implementing it once i have some free time if someone
else wouldn't.




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