We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent cb91114 commit a7f5c1bCopy full SHA for a7f5c1b
1 file changed
src/engine/renderer-vulkan/Thread/TaskList.cpp
@@ -86,11 +86,21 @@ void TaskList::Init() {
86
}
87
88
void TaskList::Shutdown() {
89
+ if ( exiting.load( std::memory_order_relaxed ) ) {
90
+ Log::WarnTag( "Shutdown() has already been called!" );
91
+ return;
92
+ }
93
+
94
executingThreads.fetch_sub( 1, std::memory_order_relaxed );
95
exiting.store( true, std::memory_order_relaxed );
96
97
98
void TaskList::FinishShutdown() {
99
+ if ( !TLM.main ) {
100
+ Log::WarnTag( "FinishShutdown() can only be called from the main thread!" );
101
102
103
104
for ( Thread* thread = threads; thread < threads + currentMaxThreads; thread++ ) {
105
thread->Exit();
106
0 commit comments