<!--
{
  "availability" : [
    "iOS: 10.0.0 -",
    "iPadOS: 10.0.0 -",
    "macCatalyst: -",
    "macOS: 10.12.0 -",
    "tvOS: 10.0.0 -",
    "visionOS: -",
    "watchOS: 3.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Dispatch",
  "identifier" : "/documentation/Dispatch/DispatchPredicate",
  "metadataVersion" : "0.1.0",
  "role" : "Enumeration",
  "symbol" : {
    "kind" : "Enumeration",
    "modules" : [
      "Dispatch"
    ],
    "preciseIdentifier" : "s:8Dispatch0A9PredicateO"
  },
  "title" : "DispatchPredicate"
}
-->

# DispatchPredicate

Logical conditions to evaluate within a given execution context.

```
enum DispatchPredicate
```

## Overview

You use dispatch predicates with the [`dispatchPrecondition(condition:)`](/documentation/Dispatch/dispatchPrecondition(condition:)) method.

## Topics

### Predicates

[`DispatchPredicate.onQueue(_:)`](/documentation/Dispatch/DispatchPredicate/onQueue(_:))

A predicate that indicates the evaluated context is the associated dispatch queue.

[`DispatchPredicate.onQueueAsBarrier(_:)`](/documentation/Dispatch/DispatchPredicate/onQueueAsBarrier(_:))

A predicate that indicates the evaluated context is the associated dispatch queue as part of a barrier operation.

[`DispatchPredicate.notOnQueue(_:)`](/documentation/Dispatch/DispatchPredicate/notOnQueue(_:))

A predicate that indicates the evaluated context is not the associated dispatch queue.



---

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)