Learn about java concurrency tool ------------ ThreadLocal
Statement: respect other people's labor achievements. Please attach the original link to reprint! Learning and communication, for reference only!
1, Introduction to ThreadLocal
1. What is ThreadLocal?
We know that in multithreaded programs, multiple threads access the same shared variable, which is easy to cause thread insecurity an ...
Posted on Fri, 12 Nov 2021 00:32:30 -0500 by sr20rps13
OkHttp source code analysis
The source code of this article is okhttp: version 4.9.0.
implementation("com.squareup.okhttp3:okhttp:4.9.0")
GitHub address
Basic Usage
After creating the request Request, you need to create a RealCall object using the newCall() method of OkHttpClient, then call execute() to initiate synchronous requests or call enqueue() to initiate asy ...
Posted on Sun, 07 Nov 2021 17:26:19 -0500 by soshea
0010 spring MVC interceptor and its source code analysis
HandlerInterceptor
The top-level interfaces of interceptors in Spring MVC are as follows:
package org.springframework.web.servlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.springframework.lang.Nullable;
public interface HandlerInterceptor {
default boolean preHandle(HttpServ ...
Posted on Mon, 01 Nov 2021 11:54:08 -0400 by hi-liter
alertmanager source code analysis
home pagespecial columngolangArticle details0alertmanager source code analysis (I)focus Published 6 minutes agoMonitoring alarm is generally taken as a whole, including data collection, storage, display, rule calculation, alarm message processing, etc. Alertmanager (hereinafter referred to as am) is an alarm message management component, includ ...
Posted on Fri, 29 Oct 2021 23:28:59 -0400 by saviiour
Redis file events
event driven
Redis server is an event driver, which is divided into file events and time events
File events: readable and writable events of socket
Timed task
They are all encapsulated in the aeEventLoop structure
typedef struct aeEventLoop {
int stop; // Identifies whether the event ends
aeFileEvent *events; // File event array to store r ...
Posted on Fri, 29 Oct 2021 22:36:06 -0400 by Hades
Express Source Analysis
Express Source Analysis
1. What happened when express() was introduced and called?
When using const express = require("express"), the default is to look for the index.js file under the express moduleIn index.js, we found that:
module.exports = require('./lib/express');
This refers to the express.js file under the lib directoryIn ...
Posted on Tue, 26 Oct 2021 12:45:52 -0400 by robdavies
This is probably the most detailed explanation of ArrayList!
Hand tear ArrayList source code
The article was first published in GitHub open source project: Java supernatural Road
Introduction to ArrayList
ArrayList is an array list. Its main underlying implementation is the Object array, but compared with the array in Java, its capacity can change dynamically and can be regarded as a dynamic arra ...
Posted on Sun, 12 Sep 2021 01:35:43 -0400 by DF7