No more userInfo dictionary and Downcasting, just deliver the concrete type value to the observer. u 2.Thread Safe u You can register, notify, unregister in any thread without crash and data corruption. u 3.Memory Safety u SwiftNotificationCenter store the observer as a zeroing-weak reference. No crash and no need to unregister manually.
read-write lock is also referred to as a shared-exclusive lock. This type of lock is typically used in larger-scale operations and can significantly improve performance if the protected data structure is read frequently and modified only occasionally. ——《Threading Programming Guide》