Types and discrimination of Java locks

Source: Internet
Author: User

Lock as a tool for concurrent shared data, ensuring consistency, there are many implementations in the Java platform (such as synchronized and Reentrantlock, etc.).

These locks have been written to provide convenience for our development, but the specific nature and type of the lock are rarely mentioned. This series of articles will analyze the common locks in Java and their features to answer questions.

1, Spin lock 2, other types of spin lock 3, blocking lock 4, can be re-entry lock 5, read and write lock 6, mutual exclusion lock 7, pessimistic lock 8, optimistic lock 9, fair Lock 10, unfair lock 11, biased lock 12, object lock 13, line locks 14, lock coarsening 15, lightweight lock 16, lock elimination 17, lock expansion 18, signal volume

Types and discrimination of Java locks

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.