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

Clean up our mutex, fix try_lock not hooking into assert mechanism #1219

Merged
merged 3 commits into from
Nov 7, 2018

Conversation

Adlai-Holler
Copy link
Member

Might want to use split diff for this.

Just a major overhaul to clear some space. Note: AS_CHECK_LOCKING_SAFETY is gone – if we have asserts that are failing despite correct usage of our APIs, we need to comment them out and address them.

@@ -9,11 +9,8 @@

#import <Foundation/Foundation.h>

#import <assert.h>
#import <os/lock.h>
#import <pthread.h>
Copy link
Member Author

Choose a reason for hiding this comment

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

Note: pthread is still imported for ASDisplayNodeThreadIsMain function (no "main thread" in libcxx).

Copy link
Contributor

@maicki maicki left a comment

Choose a reason for hiding this comment

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

Nice work and this will make sure our asserts actually holding while using tryLock :)

@Adlai-Holler Adlai-Holler changed the title Clean up our mutex Clean up our mutex, fix try_lock not hooking into assert mechanism Nov 7, 2018
@Adlai-Holler Adlai-Holler merged commit 4cfc333 into master Nov 7, 2018
@Adlai-Holler Adlai-Holler deleted the AHImproveMutex branch November 7, 2018 18:47
mikezucc pushed a commit to mikezucc/Texture that referenced this pull request Nov 7, 2018
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