Summary and thinking of Java concurrent programming detailed series of best examples of Java Concurrent Programming

Summary and thinking of Java concurrent programming detailed series of best examples of Java Concurrent Programming     writing high-quality concurrent code is a very difficult task. The Java language has built-in pairs since the first version Multithreading Our support was great in those years, but when we Concurrent programming With a ...

Posted by lisa99 on Sun, 05 Dec 2021 17:03:27 -0800

Principle analysis of timer ScheduledExecutorService

I. simple use Environment: jdk8 DateTimeFormatter dtf = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"); ScheduledExecutorService executorService=new ScheduledThreadPoolExecutor(1); executorService.scheduleWithFixedDelay(()->{ System.out.println(dtf.format(LocalDateTime.now())); },1,3, TimeUnit.SECOND ...

Posted by infusionstudios on Fri, 03 Dec 2021 15:25:57 -0800

JUC high concurrency programming II

5. Collection thread safety Thread unsafe demo for collection ArrayListpackage com.codetip.codejuc.juc.conllections; import java.util.ArrayList; import java.util.List; import java.util.UUID; public class ThreadArrayList { public static void main(String[] args) { List<String> list = new ArrayList<>(); for ...

Posted by Nolan on Sun, 28 Nov 2021 14:43:19 -0800

Using C + + concurrent API [async, thread, atomic, volatile] - Lecture 16 of C++2.0

Concurrent API usage 0 Basics Hardware thread (logical core): the thread actually executing the calculation (number of hardware threads = number of physical CPUs * number of physical cpu cores * number of logical cores per core (2) [with hyper threading technology enabled])Software thread: the thread used by the operating system for cross ...

Posted by Alex C on Sun, 28 Nov 2021 05:56:01 -0800

[RRQMSocket.RPC] C# advanced usage settings of RRQMRPC based on TCP protocol

1, Preface Notes to this section Before learning this section, you must be familiar with the creation of TcpRpcParser parser and TcpRpcClient client (or its derived classes, such as file transfer) in RRQM. If you are not familiar with it, please understand it in the following links. [RRQMSocket.RPC] C# create an RPC that supports ref a ...

Posted by nextman on Thu, 25 Nov 2021 22:42:20 -0800

Rocket MQ Series II - producer principle

Producer principle Producer overview         The party sending the message is called the producer. His role in the entire RocketMQ production and consumption system is shown in the figure:         Producer group: a logical concept. When using producer instances, you need to specify a group name. A ...

Posted by jayskates on Tue, 16 Nov 2021 07:31:23 -0800

An article to understand Timer

preface This article belongs to the column "100 problems to solve Java concurrency". This column is original by the author. Please indicate the source of quotation. Please help point out the deficiencies and errors in the comment area. Thank you! Please refer to table of contents and references for this column 100 problems to sol ...

Posted by Sassci on Wed, 10 Nov 2021 14:50:37 -0800

How does the thread pool print stack information?

preface This article belongs to the column "100 problems to solve Java concurrency". This column is original by the author. Please indicate the source of quotation. Please help point out the deficiencies and errors in the comment area. Thank you! Please refer to table of contents and references for this column 100 problems to sol ...

Posted by Zoofu on Wed, 10 Nov 2021 08:39:55 -0800

[high concurrency] deeply analyze the Callable interface

Hello, I'm glacier~~ This article is pure dry goods. It deeply analyzes the Callable interface from the perspective of source code. I hope you can step down, open your IDE, and follow the article to see the source code. I believe you will gain a lot. 1. Introduction to callable interface The Callable interface is a new generic interface in JDK1 ...

Posted by PaulRyan on Sun, 07 Nov 2021 20:36:43 -0800

On atomic class

What are atomic classes and what are their functions? inseparableAn operation is non interruptible and can be guaranteed even in the case of multithreadingjava.util.concurrent.atomicAtomic classes are similar to locks to ensure thread safety in concurrency. However, atomic classes have some advantages over locksFiner granularity: atomic variab ...

Posted by web_master on Fri, 05 Nov 2021 20:59:19 -0700