Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ASTextNode] Fix a deadlock that could occur when enabling experiment…
…al ASTextNode2 via ASConfiguration (TextureGroup#903) Because multiple threads can enter this allocWithZone: method around the same time, it is possible for one of them to setSuperclass first, and then the second thread would get stuck in an infinite loop. When climbing the inheritance heirarchy, ASTextNode2 would be encountered by this second thread, and it would continue until reaching c == Nil. Since there was no case to catch this, an infinite loop would result. Then the main thread can be deadlocked if a method like waitUntilAllUpdatesAreProcessed is called on ASCollectionView.
- Loading branch information