mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-06-19 03:49:29 -04:00
attempt at making remoteDirModel less CPU intentive. Remove potential deadlock source in SearchDialog.
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4155 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
2dbd6f4380
commit
a337941555
5 changed files with 82 additions and 12 deletions
|
@ -27,6 +27,7 @@
|
|||
#include "RetroShareLink.h"
|
||||
#include "msgs/MessageComposer.h"
|
||||
#include "gui/RSHumanReadableDelegate.h"
|
||||
#include "gui/RsAutoUpdatePage.h"
|
||||
#include "settings/rsharesettings.h"
|
||||
#include "advsearch/advancedsearchdialog.h"
|
||||
|
||||
|
@ -672,6 +673,15 @@ void SearchDialog::updateFiles(qulonglong search_id,FileDetail file)
|
|||
|
||||
void SearchDialog::processResultQueue()
|
||||
{
|
||||
// This avoids a deadlock when gpg callback asks a passwd.
|
||||
// Send again in 10 secs.
|
||||
//
|
||||
if(RsAutoUpdatePage::eventsLocked())
|
||||
{
|
||||
QTimer::singleShot(10000,this,SLOT(processResultQueue())) ;
|
||||
return ;
|
||||
}
|
||||
|
||||
int nb_treated_elements = 0 ;
|
||||
|
||||
while(!searchResultsQueue.empty() && nb_treated_elements++ < 500)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue