Hi,

On Wed, 2005-01-05 at 14:49 -0800, Kaffe CVS wrote:
>  public ZipFile(String fname) throws IOException
>  {
>       name = fname;
> -     zip = openZipFile0(fname);
> +     /* only have one thread at a time attempt to open the zip file */
> +     synchronized(fname) {
> +         zip = openZipFile0(fname);
> +     }

Note that strings don't have to be unique objects. You might want to do
a fname = fname.intern() first to be sure. And depending on how
openZipFile0 works (I haven't actually checked) you might want to make
sure that it recognizes different paths to the same file correctly.
The safest would be to just synchronize on ZipFile.class

Cheers,

Mark

Attachment: signature.asc
Description: This is a digitally signed message part

_______________________________________________
kaffe mailing list
kaffe@kaffe.org
http://kaffe.org/cgi-bin/mailman/listinfo/kaffe

Reply via email to