Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Source/ASConfigurationInternal.mm
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ - (instancetype)init

- (void)frameworkDidInitialize
{
ASDisplayNodeAssertMainThread();
// ASDisplayNodeAssertMainThread(); /* a obstacle to run SwiftUI Preview */
if (_frameworkInitialized) {
ASDisplayNodeFailAssert(@"Framework initialized twice.");
return;
Expand Down
2 changes: 1 addition & 1 deletion Source/ASDisplayNode+Beta.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

NS_ASSUME_NONNULL_BEGIN

ASDK_EXTERN void ASPerformBlockOnMainThread(void (^block)(void));
ASDK_EXTERN void ASPerformBlockOnMainThread(void NS_SWIFT_UI_ACTOR (^block)(void));
ASDK_EXTERN void ASPerformBlockOnBackgroundThread(void (^block)(void)); // DISPATCH_QUEUE_PRIORITY_DEFAULT

/**
Expand Down
4 changes: 2 additions & 2 deletions Source/ASInternalHelpers.mm
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ void ASInitializeFrameworkMainThreadOnConstructor(void)
{
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{
ASDisplayNodeCAssertMainThread();
// ASDisplayNodeCAssertMainThread(); /* a obstacle to run SwiftUI Preview */
ASNotifyInitialized();
#if AS_SIGNPOST_ENABLE
_ASInitializeSignpostObservers();
Expand All @@ -77,7 +77,7 @@ void ASInitializeFrameworkMainThreadOnDestructor(void)
{
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{
ASDisplayNodeCAssertMainThread();
// ASDisplayNodeCAssertMainThread(); /* a obstacle to run SwiftUI Preview */
// Ensure these values are cached on the main thread before needed in the background.
if (ASActivateExperimentalFeature(ASExperimentalLayerDefaults)) {
// Nop. We will gather default values on-demand in ASDefaultAllowsGroupOpacity and ASDefaultAllowsEdgeAntialiasing
Expand Down