Jan Vesely <[email protected]> writes: > Abort all dependent events. > Signed-off-by: Jan Vesely <[email protected]> > --- > src/gallium/state_trackers/clover/core/event.cpp | 7 ++++++- > 1 file changed, 6 insertions(+), 1 deletion(-) > > diff --git a/src/gallium/state_trackers/clover/core/event.cpp > b/src/gallium/state_trackers/clover/core/event.cpp > index cd5d786604..ed2b6ebdb8 100644 > --- a/src/gallium/state_trackers/clover/core/event.cpp > +++ b/src/gallium/state_trackers/clover/core/event.cpp > @@ -51,7 +51,12 @@ event::trigger_self() { > void > event::trigger() { > if (wait_count() == 1) > - action_ok(*this); > + try { > + action_ok(*this); > + } catch (error &e) { > + for (event &ev : abort_self(e.get())) > + ev.abort(e.get()); > + } >
Any reason not to do it like:
| try {
| if (wait_count() == 1)
| action_ok(*this);
| } catch (error &e) {
| abort(e.get());
| }
That seems slightly simpler and it should make sure that the abort
action of the failing event is executed as well.
Thanks.
> for (event &ev : trigger_self())
> ev.trigger();
> --
> 2.16.4
signature.asc
Description: PGP signature
_______________________________________________ mesa-dev mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/mesa-dev
