Skip to content

Commit 61574d8

Browse files
sergey-semenovbader
authored andcommitted
[SYCL] Do not suppress exceptions thrown by async_handler from ~queue()
The spec states that the asynchronous exception handler is called on queue destruction, so it is expected that given a throwing async_handler an exception will be visible in that case. Signed-off-by: Sergey Semenov <sergey.semenov@intel.com>
1 parent f22c32c commit 61574d8

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

sycl/include/CL/sycl/detail/queue_impl.hpp

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -59,12 +59,7 @@ class queue_impl {
5959
}
6060

6161
~queue_impl() {
62-
try {
63-
throw_asynchronous();
64-
} catch (...) {
65-
assert(!"The asynchronous error handler should not throw exceptions from "
66-
"the queue destructor.");
67-
}
62+
throw_asynchronous();
6863
if (m_OpenCLInterop) {
6964
PI_CALL(RT::piQueueRelease(m_CommandQueue));
7065
}

0 commit comments

Comments
 (0)