Playing around with the bad msleep()... This definitely needs more

investigation and a proper fix.

svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=954968
This commit is contained in:
Volker Lanz 2009-04-16 16:39:13 +00:00
parent 9bda1ce0e4
commit 0bbf53b534
1 changed files with 5 additions and 6 deletions

View File

@ -77,11 +77,10 @@ void OperationRunner::run()
suspendMutex().unlock();
/** @todo Sleep a little to give others a chance to suspend us.
ProgressDialog::slotButtonClicked() blocks if we don't sleep here... Why?
It should block until we unlock above, but it blocks until run() ends...
*/
msleep(100);
// Sleep a little to give others a chance to suspend us. This should normally not be
// required -- is it possible that the compiler just optimizes our unlock/lock away
// if we don't sleep?
msleep(5);
}
if (!status)
@ -102,7 +101,7 @@ qint32 OperationRunner::numOperations() const
qint32 OperationRunner::numJobs() const
{
qint32 result = 0;
foreach (const Operation* op, operationStack().operations())
result += op->jobs().size();