Skip to content

Commit ca28a05

Browse files
Wrap with mutex
Signed-off-by: Tikhomirova, Kseniya <[email protected]>
1 parent 4b93e5f commit ca28a05

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

sycl/source/detail/platform_impl.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,8 +266,10 @@ platform_impl::get_devices(info::device_type DeviceType) const {
266266
[&Platform = MPlatform](plugin &Plugin) {
267267
return Plugin.containsPiPlatform(Platform);
268268
});
269-
if (It != Plugins.end())
269+
if (It != Plugins.end()) {
270+
std::lock_guard<std::mutex> Guard(*(It->getPluginMutex()));
270271
(*It).adjustLastDeviceId(MPlatform);
272+
}
271273
return Res;
272274
}
273275

0 commit comments

Comments
 (0)