[llvm] [libsycl] implement methods of synchronization in event and queue classes (PR #205860)
Kseniya Tikhomirova via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 13 05:30:01 PDT 2026
================
@@ -18,4 +19,24 @@ exception_list::iterator exception_list::begin() const { return MList.begin(); }
exception_list::iterator exception_list::end() const { return MList.cend(); }
+void detail::addAsyncException(exception_list &List,
+ const std::exception_ptr &Exception) {
+ List.MList.emplace_back(Exception);
+}
+
+void detail::defaultAsyncHandler(exception_list Exceptions) {
+ std::cerr << "Default async_handler caught exceptions:";
+ for (auto &EIt : Exceptions) {
+ try {
+ if (EIt) {
+ std::rethrow_exception(EIt);
+ }
+ } catch (const std::exception &E) {
----------------
KseniyaTikhomirova wrote:
sycl::exception inherits std::exception and exception_list has generic value type:
` using value_type = std::exception_ptr;`
so it is expected to catch std::exception here
https://github.com/llvm/llvm-project/pull/205860
More information about the llvm-commits
mailing list