Hi guys, I have a 5 threads running at the same time that accesses a method during runtime. What I want is, there should only be one
thread that should access that method. If there is already one thread executing that method, the other threads just sleep or wait until it is finished executing...
So far what I did is:
Could someone please comment on my code?
Thanks