Overview
Features
Download
Documentation
Community
Add-Ons & Services

Is Poco::Zip threadsafe ?

Please post support and help requests here.

Is Poco::Zip threadsafe ?

Postby lazalong » 14 Jun 2009, 16:57

Hey

I couldn't find if the zip part is thread safe. I know I could make a test code but I am a bit busy :mrgreen:

What happens if two or more threads access different zip files at the same time ? Or even the same file? Is there a risk of data corruption? This would have an impact on the design of our ResourceManager.

For the sake of the argument Zziplib isn't thread safe

Btw speaking of thread safety, wouldn't it be code to indicate in the documentation the class or methods that are thread safe?
lazalong
 
Posts: 16
Joined: 15 Feb 2008, 08:36
Location: Australia

Re: Is Poco::Zip threadsafe ?

Postby guenter » 17 Jun 2009, 08:21

I couldn't find if the zip part is thread safe. I know I could make a test code but I am a bit busy :mrgreen:

What happens if two or more threads access different zip files at the same time ? Or even the same file? Is there a risk of data corruption? This would have an impact on the design of our ResourceManager.

It is certainly safe to access different Zip files in different threads using different ZipArchive objects.
It is not safe to access the same object (ZipArchive or other) from different threads simultaneously.
It is not safe to modify the same Zip file using different ZipArchive or ZipManipulator instances from different threads.

Btw speaking of thread safety, wouldn't it be code to indicate in the documentation the class or methods that are thread safe?

Yes.
guenter
 
Posts: 1112
Joined: 11 Jul 2006, 16:27
Location: Austria


Return to Support

Who is online

Users browsing this forum: No registered users and 4 guests

cron