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

Cancel the event referred to by `handle` and release the handle&period;

== Synopsis

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

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

== Description

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;

== Return Value

0 on successful cancellation, and a non&hyphen;zero value otherwise

== Parameters

[cols="1,4"]
|===
| Name| Description
| *handle*
| event handle to cancel and release
|===


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