The java.util.concurrent package structure of the JDK source JDK

Source: Internet
Author: User

This article intercepts all classes of the concurrent package from the JDK source package, and gives an overview of the overall structure of the package.
Before JDK1.5, in Java to do business concurrency, often need to have a programmer to complete the code implementation, of course, there are some open-source framework to provide these features, but these still do not have the features of the JDK is easy to use. When it comes to high-quality Java multithreading concurrent programming, in order to prevent the occurrence of such phenomena as dead jumping, such as wait (), notify () and synchronized before using Java, often need to consider performance, deadlock, fairness, Many factors, such as resource management and how to avoid the harm of thread safety, often use some more complex security policies, which aggravate the programmer's development burden. Fortunately, after the advent of JDK1.5, the Sun's Great God (Doug LEA) finally launched the Java.util.concurrent Toolkit for us to simplify concurrent completion. With this, developers will effectively reduce the competitive conditions (race conditions) and deadlock threads. The concurrent package solves these problems well and provides us with a more practical model of concurrent programs.

The JDK's Java.util.concurrent package contains two sub-packages atomic and locks.

Java.util.concurrent.atomic

Atomic contains atomic classes.

Java.util.concurrent.locks

Locks package contains lock-related classes, such as lock, condition, etc.

Java.util.concurrent

The concurrent package contains several concurrent tool classes, such as executors, Semaphore, Countdownlatch, Cyclicbarrier, Blockingqueue, and so on.

Resources:
Concurrent usage in Java
Java.util.concurrent Package Source Analysis
Read the JDK source code

The java.util.concurrent package structure of the JDK source JDK

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.