Java Learning Notes-multithreading (java.util.concurrent and contract, reproduced)

Source: Internet
Author: User

The class that describes the thread: runable and thread belong to the Java.lang package

Second, built-in lock synchronized belongs to the JVM keyword, built-in conditional queue operation Interface Object.wait ()/notify ()/notifyall () belongs to Java.lang package

Second, the volatile that provides memory visibility and prevents command rearrangement belongs to the JVM keyword

Four, while the Java.util.concurrent package (J.U.C) contains some of the tools that are useful in Java concurrency programming, including several parts:

1, locks part: Included in the Java.util.concurrent.locks package, provide explicit lock (mutual exclusion and sketch lock) related functions;

2, Atomic part: Included in the Java.util.concurrent.atomic package, provides the atomic variable class related function, is constructs the non-blocking algorithm the foundation;

3, Executor part: Scattered in the Java.util.concurrent package, to provide thread pool related functions;

4, Collections part: Scattered in the java.util.concurrent package, providing concurrent container related functions;

5, tools part: Scattered in the Java.util.concurrent package, provide synchronization tools, such as signal volume, blocking, fence and other functions;

Reprinted from:

Java Concurrency: Multithreading and java.util.concurrent and contract summary

Java Learning Notes-multithreading (java.util.concurrent and contract, reproduced)

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.