<!--
{
  "availability" : [
    "iOS: 2.0.0 - 27.0.0",
    "iPadOS: 2.0.0 - 27.0.0",
    "macCatalyst: 13.1.0 - 27.0.0",
    "macOS: 10.2.0 - 27.0.0",
    "tvOS: 9.0.0 - 27.0.0",
    "visionOS: 1.0.0 - 27.0.0"
  ],
  "documentType" : "symbol",
  "framework" : "CFNetwork",
  "identifier" : "/documentation/CFNetwork/CFNetServiceUnscheduleFromRunLoop(_:_:_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "CFNetwork"
    ],
    "preciseIdentifier" : "c:@F@CFNetServiceUnscheduleFromRunLoop"
  },
  "title" : "CFNetServiceUnscheduleFromRunLoop(_:_:_:)"
}
-->

# CFNetServiceUnscheduleFromRunLoop(_:_:_:)

Unschedules a CFNetService from a run loop.

```
func CFNetServiceUnscheduleFromRunLoop(_ theService: CFNetService, _ runLoop: CFRunLoop, _ runLoopMode: CFString)
```

## Parameters

`theService`

The CFNetService that is to be unscheduled; cannot be `NULL`.

`runLoop`

The run loop; cannot be `NULL`.

`runLoopMode`

The mode from which the service is to be unscheduled; cannot be `NULL`.

## Discussion

Unschedules the specified service from the specified run loop and mode. Call this function to shut down a service that is running asynchronously. To complete the shutdown, call [`CFNetServiceSetClient(_:_:_:)`](/documentation/CFNetwork/CFNetServiceSetClient(_:_:_:)) and set `clientCB` to `NULL`. Then call [`CFNetServiceCancel(_:)`](/documentation/CFNetwork/CFNetServiceCancel(_:)).

### Special Considerations

This function is thread safe.

---

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)