Is NSNotificationCenter thread safe?

后端 未结 2 1339
臣服心动
臣服心动 2021-02-13 16:52

Can I post a notification in a given queue and receive it on another? I want to use notifications to communicate different queues, but I\'m not sure if this is safe...

2条回答
  •  囚心锁ツ
    2021-02-13 17:12

    No. Notifications are delivered in the same thread that they are sent from, this you will need to re-send it in some way to get the notification to your thread.

提交回复
热议问题