[#BloombergLP-bdlmt-EventScheduler-cancelEvent-01]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlmt.adoc[bdlmt]::xref:BloombergLP/bdlmt/EventScheduler.adoc[EventScheduler]::cancelEvent
:relfileprefix: ../../../
:mrdocs:

`cancelEvent` overloads

== Synopses

Declared in `&lt;bdlmt&lowbar;eventscheduler&period;h&gt;`

Cancel the event having the specified `handle` and release the handle&period; Return 0 on successful cancellation, and a non&hyphen;zero value if the `handle` is invalid _or_ if the event has already been dispatched or canceled&period; Note that `handle` is released whether this call is successful or not&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
int
xref:BloombergLP/bdlmt/EventScheduler/cancelEvent-0ab.adoc[cancelEvent](xref:BloombergLP/bdlmt/EventScheduler/EventHandle.adoc[EventHandle]* handle);
----

[.small]#xref:BloombergLP/bdlmt/EventScheduler/cancelEvent-0ab.adoc[_» more&period;&period;&period;_]#

Same as the preceding overload, for a recurring&hyphen;event handle&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
int
xref:BloombergLP/bdlmt/EventScheduler/cancelEvent-0ae.adoc[cancelEvent](xref:BloombergLP/bdlmt/EventScheduler/RecurringEventHandle.adoc[RecurringEventHandle]* handle);
----

[.small]#xref:BloombergLP/bdlmt/EventScheduler/cancelEvent-0ae.adoc[_» more&period;&period;&period;_]#

Cancel the event having the specified `handle`&period; Return 0 on successful cancellation, and a non&hyphen;zero value if the `handle` is invalid _or_ if the event has already been dispatched or canceled&period; Note that due to the implicit conversion from Handle types, these methods also match the following&colon; &grave; int cancelEvent(const EventHandle&amp; handle)&semi; int cancelEvent(const RecurringEventHandle&amp; handle)&semi; &grave; 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&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
int
xref:BloombergLP/bdlmt/EventScheduler/cancelEvent-05.adoc[cancelEvent](xref:BloombergLP/bdlmt/EventScheduler/Event.adoc[Event] const* handle);
----

[.small]#xref:BloombergLP/bdlmt/EventScheduler/cancelEvent-05.adoc[_» more&period;&period;&period;_]#

Same as the preceding overload, for a recurring event&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
int
xref:BloombergLP/bdlmt/EventScheduler/cancelEvent-0c.adoc[cancelEvent](xref:BloombergLP/bdlmt/EventScheduler/RecurringEvent.adoc[RecurringEvent] const* handle);
----

[.small]#xref:BloombergLP/bdlmt/EventScheduler/cancelEvent-0c.adoc[_» more&period;&period;&period;_]#


[.small]#Created with https://www.mrdocs.com[MrDocs]#
