Deep understanding of thread pool Fork Join in concurrent programming
Deep understanding of thread pool Fork Join in concurrent programming
1, What is Fork Join
Maybe junior programmers don't know what Fork Join is. Let's take a simple example to illustrate:
Suppose we need to send 10W emails in groups, which method may we use? Some people may say that using threads or thread pools, each thread sends ...
Posted by mazman13 on Thu, 17 Feb 2022 20:16:09 +0100
Summary of java multithreaded producer consumer model
catalogue
Introduction to producer consumer model
wait,notify scheme
Implementation of ReentrantLock
Implementation of blocking queue
Semaphore implementation
Lockless caching framework: Disruptor
Note: This article refers to [Java summary] producer consumer model_ zhujohnle's column - CSDN blog
Java implementation of producer consumer ...
Posted by sandingmachine on Thu, 17 Feb 2022 17:14:20 +0100
How is the condition in AQS implemented
Function of condition
In fact, there are many usage scenarios of condition, which can be used in concurrent scenarios involving condition judgment, such as:
Judge whether the queue is full or empty in the ArrayBlockingQueue of the blocking queueBlock and wake up all threads in CyclicBarrierJudgment of blocking access queue data in DelayQueueC ...
Posted by umguy on Wed, 16 Feb 2022 15:12:48 +0100
scapy dual thread, blocking, monitoring, contracting, shaking hands, sending http requests
Involving knowledge
1. The essence of handshake and wave
In fact, I think waving and shaking hands are completely confusing concepts. The change of serial number and verification number completely depends on whether you are the data sender or receiver.
The data here only refers to the data carried in the application layer http, excludin ...
Posted by bluedogatdingdong on Fri, 11 Feb 2022 22:57:41 +0100
Netty parameter tuning
1, CONNECT_TIMEOUT_MILLIS
Parameters belonging to socketchannelWhen the client establishes a connection, if the connection cannot be made within the specified milliseconds, a timeout exception will be thrownNote: don't use so in Netty_ Timeout is mainly used for blocking IO, while Netty is non blocking io
Examples
public class TimeOutTes ...
Posted by PCSpectra on Thu, 10 Feb 2022 17:38:30 +0100
Basic concept of java Concurrent 01- thread
Basic concept of thread:
Threads are different execution paths of the system. The following is an execution path: Each branch is a thread, and the program written before is a branch. Process: a program is a process that puts code into the code area, which is called a process Operating system scheduler Thread is a dynamic concept: multiple e ...
Posted by boofboof on Thu, 10 Feb 2022 17:27:49 +0100
What if the List set is unsafe under the condition of multithreading concurrency? The new colleague was directly confused by me
preface
Some time ago, a new employee came to the company. He said that the new employee had been outsourcing code for one and a half years before he came to our company. Once I chatted with him about List. I casually asked him how to solve the unsafe multi-threaded concurrency of List collection when outsourcing. Unexpectedly, he looked at me ...
Posted by gdboling on Thu, 10 Feb 2022 13:19:36 +0100
CountDownLatch thread synchronization for Java Concurrent Programming learning
preface
Scene description Briefly describe this step. Open three threads and call three different methods. Use the countdowncatch counter to wait for the completion of all three methods, and then merge the data
Basic concepts
introduce CountDownLatch is a synchronization tool class that allows one or more threads to wait until other t ...
Posted by davidjwest on Thu, 10 Feb 2022 08:00:51 +0100
On Multithreading
1. Process? Thread? Multitasking? In fact, there are a lot of cool programs in each process, such as cool browser, cool video, and so on. The thread is a branch or phenomenon in the process, which is an independent execution path. A process includes at least one thread. Threads can be understood as improving the efficiency of program operation, ...
Posted by phparmy on Thu, 10 Feb 2022 03:38:38 +0100
Java multithreading: take you to know different locks!
I Lock interface
Lock interface is the foundation of everything. Its abstract class is a tool used to control the access of multiple threads to shared resources
The following methods are provided to abstract the whole business:
void lock()void lockInterruptibly() throws InterruptedException: breaks the lockboolean tryLock(): non blockin ...
Posted by PHP'er on Thu, 10 Feb 2022 00:05:11 +0100