mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-03 10:22:45 -04:00
fix reentrant mutex
This commit is contained in:
parent
08c7656733
commit
39b6637f93
@ -196,6 +196,7 @@ flush_threads() {
|
|||||||
|
|
||||||
if (thread_mgr != (PageThreadManager *)NULL) {
|
if (thread_mgr != (PageThreadManager *)NULL) {
|
||||||
thread_mgr->stop_threads();
|
thread_mgr->stop_threads();
|
||||||
|
MutexHolder holder(_tlock);
|
||||||
thread_mgr->start_threads(num_threads);
|
thread_mgr->start_threads(num_threads);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -794,11 +795,10 @@ get_num_pending_writes() const {
|
|||||||
// Function: VertexDataPage::PageThreadManager::start_threads
|
// Function: VertexDataPage::PageThreadManager::start_threads
|
||||||
// Access: Public
|
// Access: Public
|
||||||
// Description: Adds the indicated of threads to the list of active
|
// Description: Adds the indicated of threads to the list of active
|
||||||
// threads. Assumes _tlock is *not* held.
|
// threads. Assumes _tlock is held.
|
||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
void VertexDataPage::PageThreadManager::
|
void VertexDataPage::PageThreadManager::
|
||||||
start_threads(int num_threads) {
|
start_threads(int num_threads) {
|
||||||
MutexHolder holder(_tlock);
|
|
||||||
_shutdown = false;
|
_shutdown = false;
|
||||||
|
|
||||||
_threads.reserve(num_threads);
|
_threads.reserve(num_threads);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user