summaryrefslogtreecommitdiff
path: root/comphelper
diff options
context:
space:
mode:
authorMatúš Kukan <matus.kukan@collabora.com>2014-09-25 11:39:11 +0200
committerMatúš Kukan <matus.kukan@collabora.com>2014-10-23 11:53:15 +0200
commit8cc5b621aa308de2272bed32bc8cd88626455831 (patch)
tree182b18c166a10b5aff9a9ffeeeeb0b68c229ec83 /comphelper
parentc8b3ed2ec3bec708df678d54fd68a1a78c6f7c8a (diff)
Remove mutex from OSequenceOutputStream; it's intended to be fast
Make the caller responsible for using it wisely. AFAICS it's used only in FastSaxSerializer, so far. Change-Id: I50d48fd7f3e6cdeb9e4637868da213b8171e542b
Diffstat (limited to 'comphelper')
-rw-r--r--comphelper/source/streaming/seqstream.cxx9
1 files changed, 1 insertions, 8 deletions
diff --git a/comphelper/source/streaming/seqstream.cxx b/comphelper/source/streaming/seqstream.cxx
index 5bc44a52e877..d66ce3bde083 100644
--- a/comphelper/source/streaming/seqstream.cxx
+++ b/comphelper/source/streaming/seqstream.cxx
@@ -159,7 +159,6 @@ OSequenceOutputStream::OSequenceOutputStream(Sequence< sal_Int8 >& _rSeq, double
void SAL_CALL OSequenceOutputStream::writeBytes( const Sequence< sal_Int8 >& _rData ) throw(NotConnectedException, BufferSizeExceededException, IOException, RuntimeException, std::exception)
{
- MutexGuard aGuard(m_aMutex);
if (!m_bConnected)
throw NotConnectedException();
@@ -210,7 +209,6 @@ void SAL_CALL OSequenceOutputStream::writeBytes( const Sequence< sal_Int8 >& _rD
void SAL_CALL OSequenceOutputStream::flush( ) throw(NotConnectedException, BufferSizeExceededException, IOException, RuntimeException, std::exception)
{
- MutexGuard aGuard(m_aMutex);
if (!m_bConnected)
throw NotConnectedException();
@@ -221,12 +219,7 @@ void SAL_CALL OSequenceOutputStream::flush( ) throw(NotConnectedException, Buff
void SAL_CALL OSequenceOutputStream::closeOutput( ) throw(NotConnectedException, BufferSizeExceededException, IOException, RuntimeException, std::exception)
{
- MutexGuard aGuard(m_aMutex);
- if (!m_bConnected)
- throw NotConnectedException();
-
- // cut the sequence to the real size
- m_rSequence.realloc(m_nSize);
+ flush();
// and don't allow any further accesses
m_bConnected = false;
}