📅  最后修改于: 2022-03-11 14:57:27.055000             🧑  作者: Mango
A Lock is a way/ method when appiled on a shared resource, informs the threads
whether it is in used currently by a thread, if it is in use,
it makes the threads to wait untill the thread which is using it releases the
lock.