SWDEV-501403 - Switch to std::shared_mutex for streamSetLock

Shared mutex allows to have access to the list of streams  from
multiple threads at the same time.

Change-Id: Ibee64b846cde03321d5b17dbee2829c0bab7e7d6
This commit is contained in:
German Andryeyev
2024-11-28 18:26:27 -05:00
parent 063f7ef32a
commit efd3ea4b30
2 changed files with 8 additions and 8 deletions
+1 -1
View File
@@ -488,7 +488,7 @@ public:
// Device lock
amd::Monitor lock_{true};
// Guards device stream set
amd::Monitor streamSetLock{};
std::shared_mutex streamSetLock;
std::unordered_set<hip::Stream*> streamSet;
/// ROCclr context
amd::Context* context_;