mail: revert ~IMAPProtocol
Waiting of worker threads in IMAPProtocol destructor introducred new deadlocks. For example: fWorkerLock grabbed in destructor leads to deadlock with CheckSubscribedFoldersCommand (which grabs this lock with flock grabbed). So, currently it should be reverted. Change-Id: Ibc4b4f85300352e045d4ce72deb804e0e613f25c Reviewed-on: https://review.haiku-os.org/714 Reviewed-by: waddlesplash <[email protected]>
This commit is contained in:
committed by
waddlesplash
parent
1f2ddf2fd0
commit
a6a7e73f80
@@ -38,15 +38,6 @@ IMAPProtocol::IMAPProtocol(const BMailAccountSettings& settings)
|
|||||||
|
|
||||||
IMAPProtocol::~IMAPProtocol()
|
IMAPProtocol::~IMAPProtocol()
|
||||||
{
|
{
|
||||||
MutexLocker locker(fWorkerLock);
|
|
||||||
for (int32 i = 0; i < fWorkers.CountItems(); i++)
|
|
||||||
fWorkers.ItemAt(i)->Quit();
|
|
||||||
int tries = 10;
|
|
||||||
while (fWorkers.CountItems() > 0 && --tries > 0) {
|
|
||||||
locker.Unlock();
|
|
||||||
snooze(500000);
|
|
||||||
locker.Lock();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user