Skip to content

Commit 9861f58

Browse files
[NFC][SYCL] Replace weak_ptr::lock() with expired() when ptr copy is not needed (#13365)
Signed-off-by: Tikhomirova, Kseniya <[email protected]>
1 parent a884a54 commit 9861f58

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sycl/source/detail/event_impl.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ void event_impl::wait(std::shared_ptr<sycl::detail::event_impl> Self,
248248
throw sycl::exception(make_error_code(errc::invalid),
249249
"wait method cannot be used for a discarded event.");
250250

251-
if (MGraph.lock()) {
251+
if (!MGraph.expired()) {
252252
throw sycl::exception(make_error_code(errc::invalid),
253253
"wait method cannot be used for an event associated "
254254
"with a command graph.");

0 commit comments

Comments
 (0)