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
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