Added critical section code example