---
title: NotificationQueue
framework: foundation
role: symbol
role_heading: Class
path: foundation/notificationqueue
---

# NotificationQueue

A notification center buffer.

## Declaration

```swift
class NotificationQueue
```

## Overview

Overview Whereas a notification center distributes notifications when posted, notifications placed into the queue can be delayed until the end of the current pass through the run loop or until the run loop is idle. Duplicate notifications can be coalesced so that only one notification is sent although multiple notifications are posted. A notification queue maintains notifications in first in, first out (FIFO) order. When a notification moves to the front of the queue, the queue posts it to the notification center, which in turn dispatches the notification to all objects registered as observers. Every thread has a default notification queue, which is associated with the default notification center for the process. You can create your own notification queues and have multiple queues per center and thread.

## Topics

### Creating Notification Queues

- [init(notificationCenter:)](foundation/notificationqueue/init(notificationcenter:).md)

### Getting the Default Queue

- [default](foundation/notificationqueue/default.md)

### Managing Notifications

- [enqueue(_:postingStyle:coalesceMask:forModes:)](foundation/notificationqueue/enqueue(_:postingstyle:coalescemask:formodes:).md)
- [enqueue(_:postingStyle:)](foundation/notificationqueue/enqueue(_:postingstyle:).md)
- [dequeueNotifications(matching:coalesceMask:)](foundation/notificationqueue/dequeuenotifications(matching:coalescemask:).md)

### Constants

- [NotificationQueue.NotificationCoalescing](foundation/notificationqueue/notificationcoalescing.md)
- [NotificationQueue.PostingStyle](foundation/notificationqueue/postingstyle.md)

## Relationships

### Inherits From

- [NSObject](objectivec/nsobject-swift.class.md)

### Conforms To

- [CVarArg](swift/cvararg.md)
- [CustomDebugStringConvertible](swift/customdebugstringconvertible.md)
- [CustomStringConvertible](swift/customstringconvertible.md)
- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [NSObjectProtocol](objectivec/nsobjectprotocol.md)

## See Also

### Notifications

- [Notification](foundation/notification.md)
- [NotificationCenter](foundation/notificationcenter.md)
