mirror of
https://github.com/panda3d/panda3d.git
synced 2025-09-30 16:58:40 -04:00
Fix deadlock waiting for Python task to end at end of program
This commit is contained in:
parent
ba919b0948
commit
1974b3e692
@ -638,6 +638,9 @@ remove_all_windows() {
|
||||
// And, hey, let's stop the vertex paging threads, if any.
|
||||
VertexDataPage::stop_threads();
|
||||
|
||||
// Stopping the tasks means we have to release the Python GIL while
|
||||
// this method runs (hence it is marked BLOCKING), so that any
|
||||
// Python tasks on other threads won't deadlock grabbing the GIL.
|
||||
AsyncTaskManager::get_global_ptr()->stop_threads();
|
||||
|
||||
#ifdef DO_PSTATS
|
||||
|
@ -58,7 +58,7 @@ class Texture;
|
||||
class EXPCL_PANDA_DISPLAY GraphicsEngine : public ReferenceCount {
|
||||
PUBLISHED:
|
||||
GraphicsEngine(Pipeline *pipeline = NULL);
|
||||
~GraphicsEngine();
|
||||
BLOCKING ~GraphicsEngine();
|
||||
|
||||
void set_threading_model(const GraphicsThreadingModel &threading_model);
|
||||
GraphicsThreadingModel get_threading_model() const;
|
||||
@ -94,7 +94,7 @@ PUBLISHED:
|
||||
|
||||
bool add_window(GraphicsOutput *window, int sort);
|
||||
bool remove_window(GraphicsOutput *window);
|
||||
void remove_all_windows();
|
||||
BLOCKING void remove_all_windows();
|
||||
void reset_all_windows(bool swapchain);
|
||||
|
||||
bool is_empty() const;
|
||||
|
Loading…
x
Reference in New Issue
Block a user