Skip to content

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

Merged
Adlai-Holler merged 3 commits into
masterfrom
AHImproveMutex
Nov 7, 2018
Merged

Clean up our mutex, fix try_lock not hooking into assert mechanism#1219
Adlai-Holler merged 3 commits into
masterfrom
AHImproveMutex

Conversation

@Adlai-Holler

Copy link
Copy Markdown
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.

Comment thread Source/Details/ASThread.h

#import <assert.h>
#import <os/lock.h>
#import <pthread.h>

Copy link
Copy Markdown
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).

@maicki maicki left a comment

Copy link
Copy Markdown
Contributor

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