Closed rafaelwinter closed 9 years ago
@rafaelwinter Sorry for the delay in replying!
Classy should not be used across threads, since it updates UIKit objects which are not thread safe. Are you sure you are not triggering a classy style update on a background thread?
@cloudkite Hi Jonas, sorry for my really long delay. I had to work in other parts of our software and had to keep this on hold. Thanks for the tip about cross-thread updates. We were triggering UI updates from background, as you suspected. I surrounded my code on a GDC dispatch block to the main thread and worked fine.
Closing the PR now! Thanks a lot!
This problem happened when a thread was changing the scheduledItems hash table, while a timer triggered an update in another thread. This issue was very rare but caused a crash with an exception like
'Collection <NSConcreteHashTable: 0x170134640> was mutated while being enumerated'
.It was solved by guarding the code parts that read and modify the hash table with a
@synchronized
block.