summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorAndrzej Hunt <andrzej@ahunt.org>2021-07-11 17:22:54 +0200
committerAndrzej Hunt <andrzej@ahunt.org>2021-07-16 07:20:36 +0200
commitf4ea1e6095ff751cbecf10061c4eff9934ffd520 (patch)
tree1a45176fec39db0a2e4926336fe0c98be3dc5771 /sd
parent01c0cf63be7155531e1240d79e3936f8c4600864 (diff)
sdremote: Transmitter: s/mQueuesNotEmpty/mProcessingRequired/
Make mProcessingRequired's name a bit more self-explanatory to make it clear what we're actually using it for. See also a 8e6cdb0 which fixed a race condition caused by incorrect use of this Condition. Change-Id: I6ad63dbd5ae8ed767f42ea22e568ac47a4d08642 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118752 Tested-by: Jenkins Reviewed-by: Andrzej Hunt <andrzej@ahunt.org>
Diffstat (limited to 'sd')
-rw-r--r--sd/source/ui/remotecontrol/Transmitter.cxx14
-rw-r--r--sd/source/ui/remotecontrol/Transmitter.hxx2
2 files changed, 8 insertions, 8 deletions
diff --git a/sd/source/ui/remotecontrol/Transmitter.cxx b/sd/source/ui/remotecontrol/Transmitter.cxx
index 76cda8feae55..f00f15502a45 100644
--- a/sd/source/ui/remotecontrol/Transmitter.cxx
+++ b/sd/source/ui/remotecontrol/Transmitter.cxx
@@ -16,7 +16,7 @@ using namespace sd;
Transmitter::Transmitter( IBluetoothSocket* aSocket )
: pStreamSocket( aSocket ),
- mQueuesNotEmpty(),
+ mProcessingRequired(),
mMutex(),
mFinishRequested( false ),
mLowPriority(),
@@ -30,7 +30,7 @@ void SAL_CALL Transmitter::run()
while ( true )
{
- mQueuesNotEmpty.wait();
+ mProcessingRequired.wait();
::osl::MutexGuard aGuard( mMutex );
@@ -52,9 +52,9 @@ void SAL_CALL Transmitter::run()
pStreamSocket->write( aMessage.getStr(), aMessage.getLength() );
}
- if ( mLowPriority.empty() && mHighPriority.empty() )
+ if ( mLowPriority.empty() && mHighPriority.empty())
{
- mQueuesNotEmpty.reset();
+ mProcessingRequired.reset();
}
}
}
@@ -63,7 +63,7 @@ void Transmitter::notifyFinished()
{
::osl::MutexGuard aGuard( mMutex );
mFinishRequested = true;
- mQueuesNotEmpty.set();
+ mProcessingRequired.set();
}
Transmitter::~Transmitter()
@@ -82,9 +82,9 @@ void Transmitter::addMessage( const OString& aMessage, const Priority aPriority
mHighPriority.push( aMessage );
break;
}
- if ( !mQueuesNotEmpty.check() )
+ if ( !mProcessingRequired.check() )
{
- mQueuesNotEmpty.set();
+ mProcessingRequired.set();
}
}
diff --git a/sd/source/ui/remotecontrol/Transmitter.hxx b/sd/source/ui/remotecontrol/Transmitter.hxx
index 1cd94ea26712..c24f5a5a46fe 100644
--- a/sd/source/ui/remotecontrol/Transmitter.hxx
+++ b/sd/source/ui/remotecontrol/Transmitter.hxx
@@ -36,7 +36,7 @@ private:
::sd::IBluetoothSocket* pStreamSocket;
- ::osl::Condition mQueuesNotEmpty;
+ ::osl::Condition mProcessingRequired;
::osl::Mutex mMutex;
/**