<!--
{
  "availability" : [
    "iOS: -",
    "iPadOS: -",
    "macCatalyst: -",
    "macOS: -",
    "tvOS: -",
    "visionOS: -",
    "watchOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreFoundation",
  "identifier" : "/documentation/CoreFoundation/CFRunLoopSourceContext/cancel",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "Core Foundation"
    ],
    "preciseIdentifier" : "c:@SA@CFRunLoopSourceContext@FI@cancel"
  },
  "title" : "cancel"
}
-->

# cancel

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

## Parameters

`info`

The `info` member of the [`CFRunLoopSourceContext`](/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

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`.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)