antranapp / blog

AnTran.App: #Swift #Kotlin #MachineLearning #Minimalism
https://antran.app
MIT License
0 stars 0 forks source link

iOS Interview - Is static var thread-safe? | An Tran #14

Open utterances-bot opened 5 months ago

utterances-bot commented 5 months ago

iOS Interview - Is static var thread-safe? | An Tran

Tricky interview question explained

https://antran.app/2024/thread_safety_interview_questions/

pradeepkas commented 5 months ago

Just one doubt: should we use a serial queue or a concurrent queue here? Because everything will work in a serial manner with current setup, even though we can perform read operations asynchronously with a concurrent queue. What do you think??

antranapp commented 5 months ago

Yes, concurrent queue should be fine as well 👌