Skip to content

Commit

Permalink
Update the wording based on feedback.
Browse files Browse the repository at this point in the history
* Clarified that `event::wait_and_throw` will pass to an async handler
  all unhandled asynchronous errors which are held by a queue or context
  associated with the event and dependent events.
* Added a note that this behaviour is equivalent to calling
  `queue::throw_asynchornous` on each event.
* Clarified that the async handler that is used to process the
  asynchornous errors is determined acording to the async handler
  priorities specified in section 4.13.1.3.
  • Loading branch information
AerialMantis committed May 16, 2024
1 parent 16b7c82 commit 3df6485
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions adoc/chapters/programming_interface.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -3835,13 +3835,16 @@ void wait_and_throw()
a@ Blocks until all commands associated with this event and any dependent
events have completed.

Any unconsumed <<async-error,asynchronous errors>> which were produced by the
execution of commands associated with this event or any dependent events, are
passed to the <<async-handler>> associated with the respective context.
Any uncomsumed <<async-error,asynchronous errors>> held by queues (or their
associated contexts) which were used to enqueue commands associated with this
event and any dependent events, are passed to the approriate <<async-handler>>
as described in <<async.handler.priorities>>.

If no user defined <<async-handler>> is associated with the context, then an
implementation-defined default <<async-handler>> is invoked to handle errors,
as described in <<subsubsec:exception.nohandler>>.
[NOTE]
====
This behaviour is equivalent to calling [code]#queue::throw_asynchronous()# on
the queue associated with this event and any dependent events.
====

a@
[source]
Expand Down Expand Up @@ -16458,6 +16461,7 @@ defined in <<subsubsec:exception.async>>.
The default <<async-handler>> must in some way report all errors passed to it,
when possible, and must then invoke [code]#std::terminate# or equivalent.

[[subsubsec:async.handler.priorities]]
==== Priorities of async handlers

If the SYCL runtime can associate an <<async-error>> with a specific queue,
Expand Down

0 comments on commit 3df6485

Please sign in to comment.