when any thread X executes the wait () and notify () methods on any thread Y, it needs to acquire the lock first.
it is said that the locking mechanism is to solve the critical resource problem, so does it allow threads to start and pause access to any critical resources? Can
wait and wake up threads in a way similar to interrupts and messages instead of locks?
Please don"t hesitate to give me advice.