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

Collection <__NSArrayM: 0x282724660> was mutated while being enumerated. #108

Open
LonfeyLi opened this issue Apr 15, 2019 · 2 comments
Open

Comments

@LonfeyLi
Copy link

CoreFoundation ___exceptionPreprocess + 228
1 libobjc.A.dylib objc_exception_throw + 56
2 CoreFoundation -[__NSSingleObjectEnumerator initWithObject:]
3 xxx -[KTVHCDataUnitQueue unitWithKey:] (KTVHCDataUnitQueue.m:57)
4 xxx -[KTVHCDataUnitPool unitWithURL:] (KTVHCDataUnitPool.m:0)
5 xxxx -[KTVHCDataReader initWithRequest:] (KTVHCDataReader.m:33)
6 xxx -[KTVHCDataStorage readerWithRequest:] (KTVHCDataStorage.m:48)
7 xxx -[KTVHCHTTPResponse initWithConnection:dataRequest:] (KTVHCHTTPResponse.m:29)
8 xxx -[KTVHCHTTPConnection httpResponseForMethod:URI:] (KTVHCHTTPConnection.m:36)
9 xxx -[HTTPConnection replyToHTTPRequest] (HTTPConnection.m:992)
10 xxx -[HTTPConnection socket:didReadData:withTag:] (HTTPConnection.m:0)
@zhangjirui
Copy link

@Property (nonatomic, strong) NSMutableArray<KTVHCDataUnit *> *unitArray;
该property不支持多线程,加锁即可

@sunshineuoow
Copy link

请教一下,KTVHCDataUnitPool 这里面调用到[KTVHCDataUnitQueue unitWithKey:]的地方都加了锁,还是可能会出现多线程的问题吗

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

No branches or pull requests

3 participants