async,future,packaged_task,promise

Section 9. async, future, packaged_task,promise This section needs to include header files #include < future > 1, std::async and std::future create background tasks and return values std::async is a function template used to start an asynchronous task. After starting an asynchronous task, it reUTF-8...

Posted by MaxBodine on Sun, 17 Oct 2021 10:15:04 +0530

❤ Concurrent programming ❤ ThreadLocal Foundation

(1) Basic understanding (1) Overview Definition: provides thread local variables. A thread local variable has independent values (copies) in multiple threads Features: simple (out of the box), fast (no extra overhead), safe (thread safe) Scenario: multithreading scenario (resource holding, thrUTF-8...

Posted by CrusaderSean on Tue, 19 Oct 2021 00:41:33 +0530

Source code analysis of ConcurrentHashMap 1.7

Principle of ConcurrentHashMap 1.7 Since Unsafe is involved in the source code, let's explain it first Introduction to Unsafe 1. Introduction to Unsafe Unsafe class is equivalent to a backdoor class in java language. It provides hardware level atomic operations, so it is widely used in some conUTF-8...

Posted by God Ownz on Sat, 23 Oct 2021 15:48:23 +0530

Analysis of AQS principle and LOCK lock principle

Author: duktig Blog: https://duktig.cn Excellent still work hard. May you enjoy what you give and enjoy what you get. For the relevant source code of this article, see: https://github.com/duktig666/learn-example/tree/8f925bf26956ca13bb0c5f358177f4c8faab4498/java-core/src/main/java/thread Lock lUTF-8...

Posted by Stinger51 on Sun, 24 Oct 2021 23:06:38 +0530

park method of LockSupport for concurrent programming and thread interrupt response

preface 1. How to understand the thread interrupt method, which means that the thread is interrupted? Can the current thread continue to execute? 2. There are several methods to judge whether a thread is interrupted. What is the difference between them? 3. What is the difference between park/uUTF-8...

Posted by oldschool on Wed, 27 Oct 2021 07:38:59 +0530

Understanding operating system -- Process -- thread -- multithreaded programming

Operating system: in essence, it is software that manages hardware devices and software resources. A complete operating system = kernel + supporting applicationsProcess / task: process is a very important software resource in the operating system, which can be regarded as the process of programUTF-8...

Posted by adamjones on Wed, 27 Oct 2021 17:19:07 +0530

First knowledge of concurrent programming first knowledge of J.U.C

1: Foundation java.util.concurrent (JUC) package is provided in Java 5.0. In this package, utility classes commonly used in concurrent programming are added to define custom subsystems similar to threads, including thread pool, asynchronous IO and lightweight task framework. Provide adjustableUTF-8...

Posted by EZE on Thu, 28 Oct 2021 07:02:20 +0530

JMM model of concurrent programming &amp; underlying principle of Volatile

The essence of concurrent programming In a certain sense, concurrent programming is actually multi-threaded programming. What are the main contents of multi-threaded programming, Multithreaded programming involves synchronous operation, thread mutually exclusive operation, disassembly and concuUTF-8...

Posted by msaz87 on Fri, 29 Oct 2021 12:09:26 +0530

The core foundation of exploration --- AQS

AQS Foundation What is AQS Presumably everyone is not very strange to it. It is a knowledge point often tested in interviews. Its full name is AbstractQueuedSynchronizer, which is the framework of blocking locks and related synchronizer tools characteristic: The state attribute is used to repreUTF-8...

Posted by ckuipers on Sat, 30 Oct 2021 10:49:12 +0530

Ali P7 Interviewer: could you briefly describe the implementation principle of class loading mechanism?

Interview question: principle of class loading mechanism Interviewer survey point Objective: to understand the interviewer's understanding of JVM, which belongs to the interview eight part essay series. Scope of investigation: working for more than 3 years. Technical background knowledge BeforeUTF-8...

Posted by ztkirby on Sun, 31 Oct 2021 16:05:05 +0530