Thursday, November 23, 2023
HomeiOS Developmentios - PostingStyle of NotificationQueue

ios – PostingStyle of NotificationQueue


I’ve realized that when utilizing NotificationQueue to put up notifications, you may select a postingStyle. That is an enumeration with three important values: whenIdle, asap, and now.

Amongst them, now represents synchronous posting, which isn’t any totally different from utilizing the put up methodology of NotificationCenter.

My query is, each whenIdle and asap appear to depend on the Runloop to find out the timing of asynchronous posting. What situations ought to I take into account when deciding which asynchronous posting methodology is most applicable?

    public enum PostingStyle : UInt, @unchecked Sendable {

        
        case whenIdle = 1

        case asap = 2

        case now = 3
    }



Supply hyperlink

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisment -
Google search engine

Most Popular

Recent Comments