mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-04 19:08:55 -04:00
prevent deadlock on exit with pstats
This commit is contained in:
parent
5d8cd59628
commit
c740062d29
@ -503,6 +503,10 @@ remove_all_windows() {
|
|||||||
// And, hey, let's stop the vertex paging threads, if any.
|
// And, hey, let's stop the vertex paging threads, if any.
|
||||||
VertexDataPage::stop_threads();
|
VertexDataPage::stop_threads();
|
||||||
|
|
||||||
|
#ifdef DO_PSTATS
|
||||||
|
PStatClient::get_global_pstats()->disconnect();
|
||||||
|
#endif
|
||||||
|
|
||||||
// Well, and why not clean up all threads here?
|
// Well, and why not clean up all threads here?
|
||||||
Thread::prepare_for_exit();
|
Thread::prepare_for_exit();
|
||||||
}
|
}
|
||||||
|
@ -106,6 +106,8 @@ ConnectionWriter::
|
|||||||
(*ti)->join();
|
(*ti)->join();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////////
|
||||||
// Function: ConnectionWriter::set_max_queue_size
|
// Function: ConnectionWriter::set_max_queue_size
|
||||||
// Access: Public
|
// Access: Public
|
||||||
// Description: Limits the number of packets that may be pending on
|
// Description: Limits the number of packets that may be pending on
|
||||||
|
@ -110,10 +110,6 @@ PStatClient() :
|
|||||||
PStatClient::
|
PStatClient::
|
||||||
~PStatClient() {
|
~PStatClient() {
|
||||||
disconnect();
|
disconnect();
|
||||||
|
|
||||||
if (has_impl()) {
|
|
||||||
delete _impl;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
@ -425,6 +421,8 @@ client_disconnect() {
|
|||||||
ReMutexHolder holder(_lock);
|
ReMutexHolder holder(_lock);
|
||||||
if (has_impl()) {
|
if (has_impl()) {
|
||||||
_impl->client_disconnect();
|
_impl->client_disconnect();
|
||||||
|
delete _impl;
|
||||||
|
_impl = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
ThreadPointer *threads = (ThreadPointer *)_threads;
|
ThreadPointer *threads = (ThreadPointer *)_threads;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user