# NSNotificationQueue class reference

mircea@jupiter.elcom.pub.ro
richard@brainstorm.co.uk
Generated at 2025-02-13 06:02:40 +0000
1995-1999 Free Software Foundation, Inc.
Software documentation for the NSNotificationQueue class
Foundation/NSNotificationQueue.h
This class supports asynchronous posting of NSNotification s to an NSNotificationCenter . The method to add a notification to the queue returns immediately. The queue will periodically post its oldest notification to the notification center. In a multithreaded process, notifications are always sent on the thread that they are posted from.
Warning the underscore at the start of the name of this instance variable indicates that, even though it is not technically private, it is intended for internal use within the package, and you should not use the variable in other code.
Warning the underscore at the start of the name of this instance variable indicates that, even though it is not technically private, it is intended for internal use within the package, and you should not use the variable in other code.
Warning the underscore at the start of the name of this instance variable indicates that, even though it is not technically private, it is intended for internal use within the package, and you should not use the variable in other code.
Warning the underscore at the start of the name of this instance variable indicates that, even though it is not technically private, it is intended for internal use within the package, and you should not use the variable in other code.
defaultQueue
Returns the default notification queue for use in this thread. It will always post notifications to the default notification center (for the entire task, which may have multiple threads and therefore multiple notification queues).
dequeueNotificationsMatching:
notification
coalesceMask:
coalesceMask
Immediately remove all notifications from queue matching notification on name and/or object as specified by coalesce mask, which is an OR (' `|` ') of the options `NSNotificationCoalescingOnName`, `NSNotificationCoalescingOnSender` (object), and `NSNotificationNoCoalescing` (match only the given instance exactly). If both of the first options are specified, notifications must match on both attributes (not just either one). Removed notifications are not posted.
enqueueNotification:
notification
postingStyle:
postingStyle
Sets notification to be posted to notification center at time dependent on postingStyle, which may be either `NSPostNow` (synchronous post), `NSPostASAP` (post soon), or `NSPostWhenIdle` (post when runloop is idle).
enqueueNotification:
notification
postingStyle:
postingStyle
coalesceMask:
coalesceMask
forModes:
modes
Sets notification to be posted to notification center at time dependent on postingStyle, which may be either `NSPostNow` (synchronous post), `NSPostASAP` (post soon), or `NSPostWhenIdle` (post when runloop is idle). coalesceMask determines whether this notification should be considered same as other ones already on the queue, in which case they are removed through a call to -dequeueNotificationsMatching:coalesceMask:. The modes argument determines which NSRunLoop mode notification may be posted in ( `nil` means NSDefaultRunLoopMode).
initWithNotificationCenter:
notificationCenter
Initialize a new instance to post notifications to the given notificationCenter (instead of the default).