| 3992 | } |
| 3993 | |
| 3994 | void YEvents::cancel(CheckStatusWrapper* status) |
| 3995 | { |
| 3996 | const bool allowCancel = destroyed.compareExchange(0, 1); |
| 3997 | if (!allowCancel) |
| 3998 | return; |
| 3999 | |
| 4000 | try |
| 4001 | { |
| 4002 | YEntry<YEvents> entry(status, this, CHECK_WARN_ZERO_HANDLE); |
| 4003 | |
| 4004 | done(status, entry, this, [&]{ |
| 4005 | entry.next()->cancel(status); |
| 4006 | if (status->getErrors()[1] == isc_att_shutdown) |
| 4007 | status->init(); |
| 4008 | }, [&]{entry.next()->deprecatedCancel(status);}); |
| 4009 | } |
| 4010 | catch (const Exception& e) |
| 4011 | { |
| 4012 | e.stuffException(status); |
| 4013 | } |
| 4014 | } |
| 4015 | |
| 4016 | void YEvents::deprecatedCancel(CheckStatusWrapper* status) |
| 4017 | { |
no test coverage detected