---
title: cancel
framework: corefoundation
role: symbol
role_heading: Instance Property
path: corefoundation/cfrunloopsourcecontext/cancel
---

# cancel

## Declaration

```swift
var cancel: ((UnsafeMutableRawPointer?, CFRunLoop?, CFRunLoopMode?) -> Void)!
```

## Parameters

- `info`: The info member of the doc://com.apple.corefoundation/documentation/CoreFoundation/CFRunLoopSourceContext structure that was used when creating the run loop source.
- `rl`: The run loop from which the run loop source is being removed.
- `mode`: The run loop mode from which the run loop source is being removed.

## Discussion

Discussion A cancel callback for the run loop source. This callback is called when the source is removed from a run loop mode. Can be NULL.

## See Also

### Callbacks

- [equal](corefoundation/cfrunloopsourcecontext/equal.md)
- [hash](corefoundation/cfrunloopsourcecontext/hash.md)
- [perform](corefoundation/cfrunloopsourcecontext/perform.md)
- [schedule](corefoundation/cfrunloopsourcecontext/schedule.md)
