Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Change ThreadPool shutdown to use deleteLater

This is to fix #9500, which has the frontend segfaulting on shutdown.  This
code will hopefully all be overhauled in the awaited webserver rewrite, but
in the mean time, let's have it behaving.

I also moved the order of removing from the deque and marking it for deletion,
as I was toying with different locking methods.
  • Loading branch information...
commit 255a074b19a9c72ee91a6028efe195d723854cf8 1 parent b34cf7d
@Beirdo Beirdo authored
Showing with 3 additions and 6 deletions.
  1. +3 −6 mythtv/libs/libmythupnp/threadpool.cpp
View
9 mythtv/libs/libmythupnp/threadpool.cpp
@@ -326,14 +326,11 @@ ThreadPool::~ThreadPool( )
while (it != m_lstThreads.end() )
{
WorkerThread *pThread = *it;
-
- if (pThread != NULL)
- delete pThread;
-
it = m_lstThreads.erase( it );
- }
-
+ if (pThread != NULL)
+ pThread->deleteLater();
+ }
}
/////////////////////////////////////////////////////////////////////////////
Please sign in to comment.
Something went wrong with that request. Please try again.