xxxxxxxxxx
we can guard the critical section to avoid data inconsistency so that only one thread have access or execute
this section of the code at a time.
that is only one thread enters this section at at a time
and when it exits other thread can enter this section.