Springboot integrated thread pool

Project background: In a project, the user's score needs to be calculated. The score is divided into five major items, and each sub item is divided into eight major items. The data of each sub item comes from another data query service. The average response time of the interface of the data query service is about 100ms. After the data is queri ...

Posted by cursed on Mon, 17 Jan 2022 05:05:27 +0100

Explain several states of Java threads in detail

The following is the built-in enumeration of states in the Thread class source code, which lists several states of Java threads: /** * A thread state. A thread can be in one of the following states: * <ul> * <li>{@link #NEW}<br> * A thread that has not yet started is in this state. * </li> * <li>{@l ...

Posted by aks.it on Mon, 17 Jan 2022 01:31:18 +0100

Java multithreading -- Introduction to ThreadLocal and memory leakage

ThreadLocal ThreadLocal is called Thread local variable. It creates a copy of the variable in each Thread. Each Thread accesses and modifies the copy of the variable in this Thread, but the variables between threads cannot access each other. ThreadLocal is not a Thread. ThreadLocal has four methods: ThreadLocal action ThreadLocal allows th ...

Posted by TheFilmGod on Sun, 16 Jan 2022 15:19:37 +0100

Java multithreading (note version with code and video links)

##Write a blog for the first time and share your study notes with you ##The video link points to the teaching video of Madness (for free) ##If there are mistakes, please criticize and correct them ##If infringement is involved, please contact me to delete it Multithreading The thread is not necessarily executed immediately after it is s ...

Posted by phpusr on Sun, 16 Jan 2022 10:09:39 +0100

Distributed theme - netty04 of NIO framework - high performance way of netty core

preface In this section, we explore the core source code of Netty. Netty is divided into seven sections: 01 Java IO evolution path02 Netty and NIO's past and present life03 Netty's first experience of reconstructing RPC framework04 Netty core high performance05 great artery Pipeline and EventLoop of netty core06 Netty's actual handwritte ...

Posted by mrbaseball34 on Sat, 15 Jan 2022 19:29:08 +0100

RabbitMQ release confirmation

Release confirmation Release confirmation principle The producer sets the channel to confirm mode. Once the channel enters the confirm mode, all messages published on the channel will be assigned a unique ID (starting from 1). Once the message is delivered to all matching queues, the broker will send a confirmation to the producer (including ...

Posted by mushroom on Sat, 15 Jan 2022 17:52:53 +0100

Java learning phase I - 24 Java-Api05-1 process thread multithreading

Process and thread 1 process 1.1 concept of process A process is a running program, which represents the memory area occupied by the program 1.2 process characteristics Independence Process is an independent entity in the system. It can have its own independent resources. Each process has its own private address space. ...

Posted by AcousticJames on Sat, 15 Jan 2022 12:08:56 +0100

How to implement thread safety in Java under multithreading environment

preface This blog will summarize Java multithreading according to the existing knowledge. The following blog is only a summary of your personal learning process. It's a great honor to be helpful to all bloggers. This blog will briefly introduce the concept of thread safety and several methods of practicing thread safety, focusing on severa ...

Posted by TimUSA on Sat, 15 Jan 2022 10:29:40 +0100

Deeply understand the principle of ThreadLocal and the problem of memory leakage

ThreadLocal principle Before reading this article, you need to understand the concept of strong, weak and virtual in Java. The transmission address is: Detailed explanation of four references of strong, weak and virtual in Java 1, Introduction It can solve the data security problem of multithreading and associate the current thread with a ...

Posted by Louis-Platt on Fri, 14 Jan 2022 22:06:47 +0100

One click to understand distributed lock 3

Distributed lock - Implementation Based on Redisson aspect We have learned from the previous two articles Implementation based on Database as well as Redis based implementation We learned about the implementation of distributed locks from the database and Redis levels. In this article, we learn about distributed locks from the aspect of re ...

Posted by hmogan on Fri, 14 Jan 2022 18:20:45 +0100