Skip to content

Antoine/swift6#6

Open
ntnmrndn wants to merge 17 commits intoFluidGroup:muukii/investigate-layout-assertionfrom
ntnmrndn:antoine/swift6
Open

Antoine/swift6#6
ntnmrndn wants to merge 17 commits intoFluidGroup:muukii/investigate-layout-assertionfrom
ntnmrndn:antoine/swift6

Conversation

@ntnmrndn
Copy link
Copy Markdown

No description provided.

@ntnmrndn ntnmrndn changed the base branch from muukii/cleanup-spm to muukii/investigate-layout-assertion November 29, 2024 02:44
* well.
*/
@property (readonly) UIView *view;
@property (readonly) NS_SWIFT_UI_ACTOR UIView *view;
Copy link
Copy Markdown

@JohnEstropia JohnEstropia Dec 4, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The documentation explains this: Only the first access (factory) is required to be in the main thread. Subsequent accesses may be called from background threads as both the view and layers may be passed between nodes and closures

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure, do you mean the comment is wrong ? reading it I explicitly understand it as main thread only

Copy link
Copy Markdown

@JohnEstropia JohnEstropia Dec 6, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The first access to it must be on the main thread, and should only be used on the main thread thereafter as well.

The latter part refers to the view/layer instance itself (which is a UIKit rule more than Textures), not the property. If you check the internal implementation of - (UIView *)view on ASDisplaynode.mm, the main thread assertion is only when the view needs to be created. The same is true for - (CALayer *)layer. Texture needs to access this internally even if the node itself is meant for background use.

* well.
*/
@property (readonly) CALayer * layer;
@property (readonly) NS_SWIFT_UI_ACTOR CALayer * layer;
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same comment here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants