Hongmeng kernel source code analysis (special process chapter) | dragon born dragon, phoenix born chicken, mouse born child can make holes | 100 blog analysis HarmonyOS source code | v46 01
Million Chinese character annotation > > intensive reading kernel source code, Chinese annotation analysis, deep foundation engineering, permanent brain memory, and four code warehouses are updated synchronously every day< gitee | github | csdn | coding >
One hundred blog Analysis > > story telling kernel, question and answer ...
Posted by dragin33 on Wed, 09 Mar 2022 11:09:34 +0100
[Java multithreading] JUC's concurrency container - getting to know concurrency queue BlockingQueue
preface
My articles related to multithreading The best learning route of concurrent programming [Java multithreading] the foundation of high concurrency cultivation. The concept of high concurrency must be understood [Java multithreading] understand the concepts of thread lock pool and wait pool [Java multithreading] understand the Java l ...
Posted by fredanthony on Wed, 09 Mar 2022 03:36:26 +0100
Java SE foundation UDP and TCP
summary
Java and C#, can use UDP and TCP protocols for network communication. This chapter only describes the basic use of UDP and TCP. Compared with various standard / non-standard TCP, ModbusTCP (occupying 502 port) and lower computer custom network communication protocols required when writing the upper computer, Java TCP and UDP progra ...
Posted by Duswa on Tue, 08 Mar 2022 21:23:45 +0100
Java compression can be so optimized! The news is so exhilarating that everyone is celebrating and spreading it to the rest of the world
background
Recently, the function of data export is being done. Since batch export is supported and the exported files are up to 3GB, it is decided to compress when exporting the final results
first day
java compression, emmm The first thought is java util. Zip the following APIs, directly to the code:
/**
* Batch compressed file v1 0
*
...
Posted by baitubai on Tue, 08 Mar 2022 15:19:29 +0100
java multithreaded pipeline method, semaphore method
java multithreaded pipeline method, semaphore method
1. Tube pass method:
Producer: the module responsible for production data (may be method, object, thread, process) Consumer: module responsible for processing data (may be method, object, thread, process) Buffer zone: consumers cannot directly use the producer's data. There is a buffer zone ...
Posted by LinuxForce on Tue, 08 Mar 2022 03:20:39 +0100
Java thread: thread creation and startup, static proxy, Lambda expression
catalogue
preface
thread
Thread creation and startup
Inherit Java Lang.Thread class
Implement Runnable interface
Implement Callable interface
Static proxy
Lambda expression
Functional interface
last
preface
I don't know if you have ever thought about why so many people can play together at the same time when we play the glory of t ...
Posted by discorevilo on Tue, 08 Mar 2022 01:23:39 +0100
Thread class source code interpretation 2 -- thread state and common methods
The source code of this article is based on jdk1 8 .
Thread state
In the Thread class, the Thread status is realized through the threadStatus property and the State enumeration class:
/* Java thread status for tools,
* initialized to indicate thread 'not yet started'
*/
private volatile int threadStatus = 0;
public enum State {
/**
...
Posted by john-formby on Mon, 07 Mar 2022 17:14:39 +0100
Java concurrency_ cas,aqs
To sum up, cas (compare and swap) can be understood literally. Each time, it gets the old value from a certain memory area and compares it with the expected value. If it is equal, it is modified to a new value. If it is not equal, it will spin (While(! compareAndSwap(old,current)). Here is my website for learning spin lock
https://blog.csdn ...
Posted by deane034 on Fri, 04 Mar 2022 20:09:59 +0100
Java Thread -- > inherit Thread and Runnable interfaces and call Thread instance object to realize multithreading
1. Inherit Thread class to realize multithreading
Java provides a Java Lang. Thread program class. If a class inherits this class, it means that this class is the main class of the Thread. However, it does not mean that this class can directly implement multithreading, because it also needs to override a run() method provided in the Thread cla ...
Posted by willwill100 on Fri, 04 Mar 2022 17:35:29 +0100
Using conditional lock to control the synchronization of multiple threads (java implementation)
catalogue
Title:
answer:
Explanation:
Recently, I did a topic of multithreading synchronization. I used conditional locking to solve it. By doing this problem, we can have a basic understanding of the application of locks. This article will briefly explain it.
Ps: after finishing, I found that this is the original question on Li buckle. T ...
Posted by moonman89 on Fri, 04 Mar 2022 13:34:38 +0100