prevent deadlock on exit with pstats

This commit is contained in:
David Rose 2008-09-26 00:34:49 +00:00
parent 5d8cd59628
commit c740062d29
3 changed files with 8 additions and 4 deletions

View File

@ -503,6 +503,10 @@ remove_all_windows() {
// And, hey, let's stop the vertex paging threads, if any.
VertexDataPage::stop_threads();
#ifdef DO_PSTATS
PStatClient::get_global_pstats()->disconnect();
#endif
// Well, and why not clean up all threads here?
Thread::prepare_for_exit();
}

View File

@ -106,6 +106,8 @@ ConnectionWriter::
(*ti)->join();
}
}
////////////////////////////////////////////////////////////////////
// Function: ConnectionWriter::set_max_queue_size
// Access: Public
// Description: Limits the number of packets that may be pending on

View File

@ -110,10 +110,6 @@ PStatClient() :
PStatClient::
~PStatClient() {
disconnect();
if (has_impl()) {
delete _impl;
}
}
////////////////////////////////////////////////////////////////////
@ -425,6 +421,8 @@ client_disconnect() {
ReMutexHolder holder(_lock);
if (has_impl()) {
_impl->client_disconnect();
delete _impl;
_impl = NULL;
}
ThreadPointer *threads = (ThreadPointer *)_threads;