diff options
author | Mohammed Abdul Azeem <azeemmysore@gmail.com> | 2017-06-08 13:32:42 +0530 |
---|---|---|
committer | Michael Meeks <michael.meeks@collabora.com> | 2017-06-08 12:50:17 +0200 |
commit | d21a675d3a7deff37fd66adc993d0179d3a39ed7 (patch) | |
tree | 54d3464355fa8eb74fcd370cbdc9d59f37ddca9f /package/inc | |
parent | 630186ff4e0eba7317e542f8c3eca39ebd068721 (diff) |
Fixing loose ends for multithread Sync in package/:
Mutexes in different classes operate exclusively, which might
cause sync problem when multithreads are involved. This
patch shares the mutex across all classes that share
the underlying stream.
Change-Id: I57e549fb7c375f93955bf54886b91b1892db1e27
Reviewed-on: https://gerrit.libreoffice.org/38563
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Tested-by: Michael Meeks <michael.meeks@collabora.com>
Diffstat (limited to 'package/inc')
-rw-r--r-- | package/inc/ZipFile.hxx | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/package/inc/ZipFile.hxx b/package/inc/ZipFile.hxx index e84ace2abd11..4aafaad77e6a 100644 --- a/package/inc/ZipFile.hxx +++ b/package/inc/ZipFile.hxx @@ -55,7 +55,7 @@ class ZipEnumeration; class ZipFile { - ::osl::Mutex m_aMutex; + rtl::Reference<SotMutexHolder> m_aMutexHolder; EntryHash aEntries; ByteGrabber aGrabber; @@ -90,11 +90,13 @@ class ZipFile public: - ZipFile( css::uno::Reference < css::io::XInputStream > &xInput, + ZipFile( const rtl::Reference<SotMutexHolder>& aMutexHolder, + css::uno::Reference < css::io::XInputStream > &xInput, const css::uno::Reference < css::uno::XComponentContext > &rxContext, bool bInitialise ); - ZipFile( css::uno::Reference < css::io::XInputStream > &xInput, + ZipFile( const rtl::Reference<SotMutexHolder>& aMutexHolder, + css::uno::Reference < css::io::XInputStream > &xInput, const css::uno::Reference < css::uno::XComponentContext > &rxContext, bool bInitialise, bool bForceRecover ); @@ -136,6 +138,7 @@ public: const css::uno::Reference < css::io::XInputStream >& rStream ); static css::uno::Reference< css::io::XInputStream > StaticGetDataFromRawStream( + const rtl::Reference<SotMutexHolder>& aMutexHolder, const css::uno::Reference< css::uno::XComponentContext >& rxContext, const css::uno::Reference< css::io::XInputStream >& xStream, const ::rtl::Reference < EncryptionData > &rData ); |