这里是文章标题

这里是作者 这里是公众号名 2021-01-01

正文第一行

‍‍
正文第二行。
图片" data-type="png" data-w="593" style="box-shadow: rgb(210, 210, 210) 0em 0em 0.5em 0px; font-size: 17px; width: 346px !important; height: auto !important; visibility: visible !important;" _width="346px" src="https://mmbiz.qpic.cn/mmbiz_png/GLeh42uInXRdNibLb2hf6QnMnWgic4Nm0KhCmicJibxESMoGfbuMrXbQB7lrYFSJPlBeGaJyciaavIBN8NLwESxia7cA/640?wx_fmt=png&tp=webp&wxfrom=5&wx_lazy=1&wx_co=1" crossorigin="anonymous" alt="图片" data-fail="0">
正文第三行,part1,文本 正文第三行,part2,链接 ,正文第三行,part3,文本。

一 JDK层

1 AbstractQueuedSynchronizer

                        代码节选自:java.util.concurrent.locks.ReentrantLock.java
                         /** Synchronizer providing all implementation mechanics */
                            private final Sync sync;
                            /**
                             * Base of synchronization control for this lock. Subclassed
                             * into fair and nonfair versions below. Uses AQS state to
                             * represent the number of holds on the lock.
                             */
                            abstract static class Sync extends AbstractQueuedSynchronizer {
                        ......
                        }
                        
public void lock() { sync.lock(); }
                    
                                /**
                                 * Acquires in exclusive mode, ignoring interrupts.  Implemented
                                 * by invoking at least once {@link #tryAcquire},
                                 * returning on success.  Otherwise the thread is queued, possibly
                                 * repeatedly blocking and unblocking, invoking {@link
                                 * #tryAcquire} until success.  This method can be used
                                 * to implement method {@link Lock#lock}.
                                 *
                                 * @param arg the acquire argument.  This value is conveyed to
                                 *        {@link #tryAcquire} but is otherwise uninterpreted and
                                 *        can represent anything you like.
                                 */
                                public final void acquire(int arg) {
                                    if (!tryAcquire(arg) &&
                                        acquireQueued(addWaiter(Node.EXCLUSIVE), arg))
                                        selfInterrupt();
                                }