is rubyzip threadsafe ?

C

come

Hi,

I wrote a program where many threads access a same uniq zip file.
Right now, I'm using the Monitor Mixin to ensure the thread safety :

Zip::ZipFile.open("my_file.zip", Zip::ZipFile::CREATE) do |zipfile|
zipfile.extend(MonitorMixin)
(...)
zipfile.synchronize { zipfile.dir.mkdir(..) }
(...)
zipfile.synchronize { zipfile.file.open("...") { |f| f.puts ... } }
end

But I feel it's not necessary to take care of this in my case. Am I
right ?

Come
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,982
Messages
2,570,186
Members
46,740
Latest member
JudsonFrie

Latest Threads

Top