Thread Sanitizer in iOS


Before starting with Thread Sanitizer. We need to know the concept of a data race.

A data race is accessing the same address from two different threads at the same time.

This is also known as Race condition.

If the above condition occurs there will different types of errors occur Like crashes etc.


For better understanding, we need to simulate a race condition.

Please check the below image to enable the thread simulator in project

For example in the view controller without a data race condition

After adding race condition and without ThreadSanitizer

Example in which data race condition occurs and thread sanitizer enabled


We can simply prevent our application from crashed-like conditions by using the above concept in the application.

I hope this blog helps you to understand the functionality of Thread Sanitizer concept.

Thanks for Reading !!

. . .

Leave a Comment

Your email address will not be published. Required fields are marked*

Be the first to comment.


Webkul is a truly trusted and supported IT Company to develop business ideas for e-commerce. They provide professional support after deploying the solution to production and be responsible to act for fixing the reported issues or system errors. We highly encourage to deal with Webkul for business development.

Hussein Zawia

Hussein Zawia

Co-founder, 24Dokan

Talk to Sales


Live Chat
Start a Project

    Message Sent!

    If you have more details or questions, you can reply to the received confirmation email.

    Back to Home