JUC
Thread 8 basic knowledge - Summary of interview questions 1. How many ways to implement threads? There are two, but only one in essence; Inherit Thread class and implement Runnable interface. Their implementation of Thread is nothing more than through these two ways 2. Which is a good way to imUTF-8...
Posted by dynamicallystatic on Fri, 28 May 2021 02:10:30 +0930
Multithreading advanced = > JUC concurrent programming 1. What is JUC java.util Toolkit (package, classification) Business: common Thread code Thread Runnable has no return value, and its efficiency is relatively low compared with Callable! 2. Threads and processes Thread, process Process: a prUTF-8...
Posted by timandkitty on Sat, 26 Jun 2021 05:35:18 +0930
1, Thread and process 1. What is a process / thread? Process: a process is a running activity of a program with certain independent functions about a certain data set. It is the basic unit of operating system dynamic execution. In traditional operating system, process is not only the basic allUTF-8...
Posted by KenGR on Wed, 30 Jun 2021 06:09:15 +0930
1. What is LockSupport LockSupport is a class under the java.util.concurrent.locks package.LockSupport is visible everywhere in the underlying implementation of various synchronization components under Java Concurrent packages.Thread blocking primitives defined in JDK to create locks and other UTF-8...
Posted by dreglo on Tue, 13 Jul 2021 04:50:21 +0930
preface I have written the analysis of concurrent HashMap before: Concurrent HashMap source code (JDK1.8) It's highly recommended to have a look. Some aspects are more detailed than this article. This article can be regarded as a supplement to this article (except for the first section) Key poUTF-8...
Posted by tomsasse on Thu, 15 Jul 2021 02:44:42 +0930
4, Understanding AQS principles through ReentrantLock two ReentrantLock locking mechanism: I learned it in the last article -Create ReentrantLock object - The logic of the first lock -The second lock (reentry) logic of the same thread. Now let's go back to our original code. public class ReentrUTF-8...
Posted by Static_Nexus on Mon, 19 Jul 2021 05:29:07 +0930
1. Overview of JUC 1.1 what is juc In Java, the thread part is a key point. The JUC mentioned in this article is also about threads. JUC is short for Java. Util. Concurrent toolkit. This is a toolkit for processing threads. JDK 1.5 began to appear. 1.2 thread and process concepts 1. Processes aUTF-8...
Posted by jcornett on Sun, 01 Aug 2021 10:49:23 +0930
This issue takes you to analyze the source code of thread pool ThreadPoolExecutor. Before reading this article, you'd better know the execution logic and core parameters of thread pool, so it's more convenient to analyze the process from the source code. Important attributes //The upper 3 bits UTF-8...
Posted by jauson on Wed, 08 Dec 2021 14:22:03 +1030
Problems between producers and consumers of JUC version Producer consumer problem of Condition interface: await() and signal() methods can accurately notify and realize the execution sequence of threads. await methods should be written in the while loop to prevent thread insecurity caused by coUTF-8...
Posted by tonga on Wed, 22 Dec 2021 02:13:47 +1030
1. What is CAS In a word: compare and exchange == Compare and Swap CAS (Compare-And-Swap) is a hardware-to-concurrency support, a special instruction in a processor designed for multiprocessor operations to manage concurrent access to shared data.CAS is an implementation of a lock-free, non-bloUTF-8...
Posted by koolswans on Thu, 23 Dec 2021 11:38:51 +1030