[delphizip] Re: Multithreading

  • From: "James Turner" <james.d.h.turner@xxxxxxxxxxxx>
  • To: <delphizip@xxxxxxxxxxxxx>
  • Date: Wed, 20 Nov 2002 11:39:24 -0000

In addition to my previous comments, I would like to make it clear that
simultaneously calling the Zip DLL from multiple threads will fail if two or
more threads try to write to the same zip archive simultaneously. This will
be true of both the thread-safe* and standard versions. This is why, when
the subject first came up a week or so ago, I suggested using critical
sections. In the general case, where file-writing is concerned, using
critical sections is the only way to ensure that multithreaded code works
correctly.

*I'm assuming here that the thread-safe version of ZipDLL simply declares
all global vars as threadvars and does not itself use critical sections - I
could be wrong about this.

-- James Turner
www.skaro.net


Other related posts: