SWDEV-372757 - Don't destroy null queue in MT

Skip destruction of the null queue for MT. Windows can destroy worker
thread on exit during the stream destruction, causing a race condition.

Change-Id: I3e4bc3ab2b477d38c0aec1fc59e6f1af0f8f6b0f
이 커밋은 다음에 포함됨:
German 작성하고 Maneesh Gupta가 2023-01-09 00:03:09 -05:00를 커밋함
1 부모 695533d435
커밋 f39655c0c8
2 파일이 변경됨
+7 -3

검색과 일치하는 파일 없음

+6 -2
파일 보기
@@ -48,8 +48,12 @@ Stream::~Stream() {
amd::ScopedLock lock(streamSetLock);
streamSet.erase(this);
queue_->release();
queue_ = nullptr;
// Skip queue destruction for null stream in MT. Queue worker thread can be destroyed on
// the app exit, during the stream destruction, causing a race condition.
if (!null_ || AMD_DIRECT_DISPATCH) {
queue_->release();
queue_ = nullptr;
}
}
}