mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-09-14 08:03:59 +00:00
* [ASDisplayNode] Ensure all subclasses are using base class __instanceLock__ and not re-defining their own. This also moves the @package definition of the instance variable to +FrameworkPrivate instead of Internal.h, because Internal.h should ideally not be used outside of the ASDisplayNode file setup. This has greatly reduced the number of imports of Internal.h. * [ASDisplayNode] Add ASDisplayNode+FrameworkSubclasses.h to share __instanceLock__ definition.
34 lines
1015 B
Objective-C
34 lines
1015 B
Objective-C
//
|
|
// ASDisplayNode+FrameworkPrivate.h
|
|
// AsyncDisplayKit
|
|
//
|
|
// Copyright (c) 2014-present, Facebook, Inc. All rights reserved.
|
|
// This source code is licensed under the BSD-style license found in the
|
|
// LICENSE file in the root directory of this source tree. An additional grant
|
|
// of patent rights can be found in the PATENTS file in the same directory.
|
|
//
|
|
|
|
//
|
|
// The following methods are ONLY for use by _ASDisplayLayer, _ASDisplayView, and ASDisplayNode.
|
|
// These methods must never be called or overridden by other classes.
|
|
//
|
|
|
|
#import "ASDisplayNode.h"
|
|
#import "ASThread.h"
|
|
|
|
// These are included because most internal subclasses need it.
|
|
#import "ASDisplayNode+Subclasses.h"
|
|
#import "ASDisplayNode+FrameworkPrivate.h"
|
|
|
|
NS_ASSUME_NONNULL_BEGIN
|
|
|
|
@interface ASDisplayNode ()
|
|
{
|
|
// Protects access to _view, _layer, _pendingViewState, _subnodes, _supernode, and other properties which are accessed from multiple threads.
|
|
@package
|
|
ASDN::RecursiveMutex __instanceLock__;
|
|
}
|
|
@end
|
|
|
|
NS_ASSUME_NONNULL_END
|