Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ASCATransactionQueue interface trashing improvements #1216

Merged
merged 2 commits into from
Nov 11, 2018

Conversation

maicki
Copy link
Contributor

@maicki maicki commented Nov 6, 2018

No description provided.

Copy link
Member

@Adlai-Holler Adlai-Holler left a comment

Choose a reason for hiding this comment

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

Diff looks good but title is misleading – this affects the ASCATransactionQueue, not the dealloc queue!

@nguyenhuy
Copy link
Member

nguyenhuy commented Nov 6, 2018

Diff looks good, but can you give a description on how this improves interface trashing?

@maicki maicki changed the title ASDeallocQueue interface trashing improvements ASCATransactionQueue interface trashing improvements Nov 6, 2018
@maicki maicki force-pushed the MSDeallocQueueImprovements branch from 551dca3 to 1865cbd Compare November 6, 2018 17:48
@maicki maicki force-pushed the MSDeallocQueueImprovements branch from 1865cbd to 6ae7fcb Compare November 8, 2018 01:52
@@ -377,17 +372,13 @@ - (instancetype)init
// __unsafe_unretained allows us to avoid flagging the memory cycle detector.
__unsafe_unretained __typeof__(self) weakSelf = self;
void (^handlerBlock) (CFRunLoopObserverRef observer, CFRunLoopActivity activity) = ^(CFRunLoopObserverRef observer, CFRunLoopActivity activity) {
while (weakSelf->_internalQueue.count > 0) {
Copy link
Member

@appleguy appleguy Nov 8, 2018

Choose a reason for hiding this comment

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

Indentation seems wrong here?

@TextureGroup TextureGroup deleted a comment Nov 8, 2018
@maicki
Copy link
Contributor Author

maicki commented Nov 8, 2018

Say before the change we are processing nodes 1, 2, 3 in queue, but the process of node 1 may do something that changes node 3's state. The while loop will handle that case, otherwise node 3's change by node 1 will be pushed to next loop.

cc @nguyenhuy @appleguy

@maicki maicki merged commit 39f25f6 into master Nov 11, 2018
@maicki maicki deleted the MSDeallocQueueImprovements branch December 13, 2018 02:21
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.

5 participants