[#BloombergLP-bdlmt-EventScheduler-cancelEvent-05] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlmt.adoc[bdlmt]::xref:BloombergLP/bdlmt/EventScheduler.adoc[EventScheduler]::cancelEvent :relfileprefix: ../../../ :mrdocs: Cancel the event having the specified `handle`. Return 0 on successful cancellation, and a non‐zero value if the `handle` is invalid _or_ if the event has already been dispatched or canceled. Note that due to the implicit conversion from Handle types, these methods also match the following: ` int cancelEvent(const EventHandle& handle); int cancelEvent(const RecurringEventHandle& handle); ` Compared to the version taking a pointer to Handle, the managed reference to the event is not released until the Handle goes out of scope. == Synopsis Declared in `<bdlmt_eventscheduler.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- int cancelEvent(xref:BloombergLP/bdlmt/EventScheduler/Event.adoc[Event] const* handle); ---- [.small]#Created with https://www.mrdocs.com[MrDocs]#