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 3 weeks ago

utterances-bot commented 3 weeks ago

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

Tricky interview question explained

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

pradeepkas commented 3 weeks 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 3 weeks ago

Yes, concurrent queue should be fine as well 👌