mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-24 07:05:35 +00:00
Remove the lock for accessing _pendingDisplayNodes and force methods regarding display to the main thread
This should fix a deadlock in ASDisplayNode and it's caused by displayWillStart: and where one thread is recursing down the tree and another thread is recursing up the tree. We remove the lock in _pendingDisplayNodes for the property, but need to guarantee that we only modify the _pendingDisplayNodes state on the main thread. Furthermore add documentation on what thread displayWillStart and displayDidFinish will be called
This commit is contained in:
@@ -206,6 +206,8 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
*
|
||||
* @discussion Subclasses may override this method to be notified when display (asynchronous or synchronous) is
|
||||
* about to begin.
|
||||
*
|
||||
* @note Called on the main thread only
|
||||
*/
|
||||
- (void)displayWillStart ASDISPLAYNODE_REQUIRES_SUPER;
|
||||
|
||||
@@ -214,6 +216,8 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
*
|
||||
* @discussion Subclasses may override this method to be notified when display (asynchronous or synchronous) has
|
||||
* completed.
|
||||
*
|
||||
* @note Called on the main thread only
|
||||
*/
|
||||
- (void)displayDidFinish ASDISPLAYNODE_REQUIRES_SUPER;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user