Original: Reprinted indicate the original address https://www.cnblogs.com/fanerwei222/p/11871593.html
--ReentrantLock use Java threads, mutex:
ReentrantLock reentrantLock = new ReentrantLock(); try { reentrantLock.lock(); } finally { reentrantLock.unlock(); }