Skip to content

Conversation

steffenlarsen
Copy link
Contributor

This commit makes the following changes to the behavior of asynchronous exception handling:

  1. The death of a queue should not consume asynchronous exceptions.
  2. Calling wait_and_throw on an event after the associated queue has died should still consume exceptions that were originally associated with the queue. This should respect the async_handler priority to the best of its ability.
  3. Calling wait_and_throw or throw_asynchronous on a queue without an async_handler should fall back to using the async_handler of the associated context, then the default async_handler if none were attached to the context.

Additionally, this lays the ground work for
#20266 by moving the tracking of unconsumed asynchronous exception to the devices.

This commit makes the following changes to the behavior of asynchronous
exception handling:

 1. The death of a queue should not consume asynchronous exceptions.
 2. Calling wait_and_throw on an event after the associated queue has
    died should still consume exceptions that were originally associated
    with the queue. This should respect the async_handler priority to
    the best of its ability.
 3. Calling wait_and_throw or throw_asynchronous on a queue without an
    async_handler should fall back to using the async_handler of the
    associated context, then the default async_handler if none were
    attached to the context.

Additionally, this lays the ground work for
intel#20266 by moving the tracking of
unconsumed asynchronous exception to the devices.

Signed-off-by: Larsen, Steffen <[email protected]>
Signed-off-by: Larsen, Steffen <[email protected]>
@@ -0,0 +1,217 @@
// RUN: %{build} -o %t.out
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I reviewed the tests, and they look good. Thanks!

Should we consider adding this test (custom_async_handler.cpp) to the CTS instead? Evidently, the CTS isn't covering this, or we would have seen a failure before. I think the other test (default_async_handler.cpp) cannot be added to the CTS because it tests our implementation-specific behavior of the default async handler.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants