<div dir="ltr">I know the working of static variables in Multi-threaded environment, but I never used static variables ( please check the code sent in one of my previous reply ) to save the unique-id. I'm using volatile keyword which is completely different from static variable ( one of the storage classes in c ), and the usage of volatile keyword here is to tell the compiler to not perform optimisation ( while compilation ) on this variable. This is useful in multi-threaded environment, as in global variable should  be declared volatile[1] in this type of environment for shared global variables. <div><br></div><div>Regarding the second comment about unique-id being whatever at some point of time : let me clear this thing, I already stated in my last reply that I'm getting unique-id ( belonging to a call ) in logs correctly even in concurrent calls ( tested with more than 1 call ).</div><div><br></div><div>Please correct me if I'm wrong here. </div><div>@Richard Mudgett : Please validate the changes I did.  </div><div><a href="https://docs.google.com/presentation/d/11LC-_e1EGL3X-n7gU_Z2uSNvPX41t6LVngO9AxBi4wo/edit?usp=sharing">[1]</a></div><div><br></div><div>Thank you all.</div><div><br></div></div>