Skip to content

Commit

Permalink
Ship ASExperimentalUnfairLock experiment (TextureGroup#1841)
Browse files Browse the repository at this point in the history
- Followup to TextureGroup#1742
- At Pinterest this shipped with D516974 in late 02/2020
- As discussed in TextureGroup#858 this is iOS10 or later, so the runtime `gMutex_unfair` check is still necessary for Texture.
  • Loading branch information
Greg Bolsinga authored and rcancro committed May 28, 2020
1 parent 6eb5b26 commit 966f12c
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 16 deletions.
1 change: 0 additions & 1 deletion Schemas/configuration.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
"exp_graphics_contexts",
"exp_text_node",
"exp_interface_state_coalesce",
"exp_unfair_lock",
"exp_infer_layer_defaults",
"exp_collection_teardown",
"exp_framesetter_cache",
Expand Down
21 changes: 10 additions & 11 deletions Source/ASExperimentalFeatures.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,16 @@ typedef NS_OPTIONS(NSUInteger, ASExperimentalFeatures) {
// will be used in all cases
ASExperimentalTextNode = 1 << 0, // exp_text_node
ASExperimentalInterfaceStateCoalescing = 1 << 1, // exp_interface_state_coalesce
ASExperimentalUnfairLock = 1 << 2, // exp_unfair_lock
ASExperimentalLayerDefaults = 1 << 3, // exp_infer_layer_defaults
ASExperimentalCollectionTeardown = 1 << 4, // exp_collection_teardown
ASExperimentalFramesetterCache = 1 << 5, // exp_framesetter_cache
ASExperimentalSkipClearData = 1 << 6, // exp_skip_clear_data
ASExperimentalDidEnterPreloadSkipASMLayout = 1 << 7, // exp_did_enter_preload_skip_asm_layout
ASExperimentalDispatchApply = 1 << 8, // exp_dispatch_apply
ASExperimentalDrawingGlobal = 1 << 9, // exp_drawing_global
ASExperimentalOptimizeDataControllerPipeline = 1 << 10, // exp_optimize_data_controller_pipeline
ASExperimentalTraitCollectionDidChangeWithPreviousCollection = 1 << 11, // exp_trait_collection_did_change_with_previous_collection
ASExperimentalDoNotCacheAccessibilityElements = 1 << 12, // exp_do_not_cache_accessibility_elements
ASExperimentalLayerDefaults = 1 << 2, // exp_infer_layer_defaults
ASExperimentalCollectionTeardown = 1 << 3, // exp_collection_teardown
ASExperimentalFramesetterCache = 1 << 4, // exp_framesetter_cache
ASExperimentalSkipClearData = 1 << 5, // exp_skip_clear_data
ASExperimentalDidEnterPreloadSkipASMLayout = 1 << 6, // exp_did_enter_preload_skip_asm_layout
ASExperimentalDispatchApply = 1 << 7, // exp_dispatch_apply
ASExperimentalDrawingGlobal = 1 << 8, // exp_drawing_global
ASExperimentalOptimizeDataControllerPipeline = 1 << 9, // exp_optimize_data_controller_pipeline
ASExperimentalTraitCollectionDidChangeWithPreviousCollection = 1 << 10, // exp_trait_collection_did_change_with_previous_collection
ASExperimentalDoNotCacheAccessibilityElements = 1 << 11 , // exp_do_not_cache_accessibility_elements
ASExperimentalFeatureAll = 0xFFFFFFFF
};

Expand Down
1 change: 0 additions & 1 deletion Source/ASExperimentalFeatures.mm
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
{
NSArray *allNames = ASCreateOnce((@[@"exp_text_node",
@"exp_interface_state_coalesce",
@"exp_unfair_lock",
@"exp_infer_layer_defaults",
@"exp_collection_teardown",
@"exp_framesetter_cache",
Expand Down
2 changes: 1 addition & 1 deletion Source/Details/ASThread.h
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ namespace AS {
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{
if (AS_AVAILABLE_IOS_TVOS(10, 10)) {
gMutex_unfair = ASActivateExperimentalFeature(ASExperimentalUnfairLock);
gMutex_unfair = YES;
}
});

Expand Down
2 changes: 0 additions & 2 deletions Tests/ASConfigurationTests.mm
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
ASExperimentalTextNode,
#endif
ASExperimentalInterfaceStateCoalescing,
ASExperimentalUnfairLock,
ASExperimentalLayerDefaults,
ASExperimentalCollectionTeardown,
ASExperimentalFramesetterCache,
Expand All @@ -45,7 +44,6 @@ + (NSArray *)names {
return @[
@"exp_text_node",
@"exp_interface_state_coalesce",
@"exp_unfair_lock",
@"exp_infer_layer_defaults",
@"exp_collection_teardown",
@"exp_framesetter_cache",
Expand Down

0 comments on commit 966f12c

Please sign in to comment.