From 39b6637f930ad1e27e26544fbda72683268e8af9 Mon Sep 17 00:00:00 2001 From: David Rose Date: Fri, 18 Jul 2008 23:44:02 +0000 Subject: [PATCH] fix reentrant mutex --- panda/src/gobj/vertexDataPage.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/panda/src/gobj/vertexDataPage.cxx b/panda/src/gobj/vertexDataPage.cxx index d88c2cbd85..077544f71a 100644 --- a/panda/src/gobj/vertexDataPage.cxx +++ b/panda/src/gobj/vertexDataPage.cxx @@ -196,6 +196,7 @@ flush_threads() { if (thread_mgr != (PageThreadManager *)NULL) { thread_mgr->stop_threads(); + MutexHolder holder(_tlock); thread_mgr->start_threads(num_threads); } } @@ -794,11 +795,10 @@ get_num_pending_writes() const { // Function: VertexDataPage::PageThreadManager::start_threads // Access: Public // 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:: start_threads(int num_threads) { - MutexHolder holder(_tlock); _shutdown = false; _threads.reserve(num_threads);