Activity的启动流程

Activity的启动流程


努力工作

自己平时工作接触的frameworks代码比较多,但真正理解的很有限,一直在努力分析。。我主要还是用补丁的形式来看


 core/java/android/app/Activity.java                |  6 +++core/java/android/app/ActivityManagerNative.java   | 14 ++++-core/java/android/app/ActivityThread.java          | 63 +++++++++++++++++++++-core/java/android/app/ApplicationThreadNative.java |  7 +++core/java/android/app/IApplicationThread.java      |  8 +++core/java/android/app/Instrumentation.java         | 16 ++++++.../android/server/am/ActivityManagerService.java  | 10 +++-.../java/com/android/server/am/ActivityStack.java  | 12 ++++-.../android/server/am/ActivityStackSupervisor.java | 51 +++++++++++++++++-9 files changed, 181 insertions(+), 6 deletions(-)diff --git a/core/java/android/app/Activity.java b/core/java/android/app/Activity.java
index 4b705dd..527cc38 100644
--- a/core/java/android/app/Activity.java
+++ b/core/java/android/app/Activity.java
@@ -3731,6 +3731,12 @@ public class Activity extends ContextThemeWrapper** @see #startActivity*/
+
+    /**
+     *Created by Smaster / one;
+     *  mParent代表的是ActivityGroup, ActivityGroup最开始被用来在一个界面中嵌入多个Activity.
+     *  --> Instrumentation execStartActivity()方法
+     * */public void startActivityForResult(Intent intent, int requestCode, @Nullable Bundle options) {if (mParent == null) {Instrumentation.ActivityResult ar =
diff --git a/core/java/android/app/ActivityManagerNative.java b/core/java/android/app/ActivityManagerNative.java
index 4e2ff0b..6ca7a32 100644
--- a/core/java/android/app/ActivityManagerNative.java
+++ b/core/java/android/app/ActivityManagerNative.java
@@ -78,6 +78,11 @@ public abstract class ActivityManagerNative extends Binder implements IActivityM/*** Retrieve the system's default/global activity manager.*/
+    /** 
+     * created by Smaster / three;
+     *
+     *
+     * */static public IActivityManager getDefault() {return gDefault.get();}
@@ -2337,7 +2342,14 @@ public abstract class ActivityManagerNative extends Binder implements IActivityMpublic IBinder asBinder() {return this;}
-
+    
+    /**
+     *created by Smaster / four;
+     * 单利封装, 在后续的调用中直接返回之前创建的对象。
+     *
+     * ----> AMS startActivity.
+     *
+     * */private static final Singleton<IActivityManager> gDefault = new Singleton<IActivityManager>() {protected IActivityManager create() {IBinder b = ServiceManager.getService("activity");
diff --git a/core/java/android/app/ActivityThread.java b/core/java/android/app/ActivityThread.java
index dd49009..6ef3729 100644
--- a/core/java/android/app/ActivityThread.java
+++ b/core/java/android/app/ActivityThread.java
@@ -545,7 +545,21 @@ public final class ActivityThread {}private native void dumpGraphicsInfo(FileDescriptor fd);
+ 
+    /**
+     * created by Smaster / nineteen;
+     *   继承ApplicationThreadNative, ApplicationThreadNative 继承Binder ;
+     *   并实现IApplicationThread接口,
+     *   类似AIDL 
+     *   ApplicationThreadNative 中&emsp;--> ApplicationThreadProxy类。
+     * */+    /**
+     * created by Smaster / twenty-one;
+     *  再次从ApplicationThreadNative中归来;
+     *&emsp;ApplicationThread 是真正实现IApplicationThread的类;
+     *  --> scheduleLaunchActivity --> 启动Activity.
+     * */private class ApplicationThread extends ApplicationThreadNative {private static final String ONE_COUNT_COLUMN = "%21s %8d";private static final String TWO_COUNT_COLUMNS = "%21s %8d %21s %8d";
@@ -603,6 +617,9 @@ public final class ActivityThread {// we use token to identify this activity without having to send the// activity itself back to the activity manager. (matters more with ipc)
+        //
+        // created by Smaster / twenty-two;
+        // sendMessage --> 发送一个消息给H处理。 --> Handler&emsp;中&emsp;Hpublic final void scheduleLaunchActivity(Intent intent, IBinder token, int ident,ActivityInfo info, Configuration curConfig, CompatibilityInfo compatInfo,IVoiceInteractor voiceInteractor, int procState, Bundle state,
@@ -1158,6 +1175,11 @@ public final class ActivityThread {}}+    /**
+     * created by Smaster / twenty-three;
+     *  对消息的处理;&emsp;LAUNCH_ACTIVITY ;
+     *
+     * */private class H extends Handler {public static final int LAUNCH_ACTIVITY         = 100;public static final int PAUSE_ACTIVITY          = 101;
@@ -1266,6 +1288,12 @@ public final class ActivityThread {}return Integer.toString(code);}
+
+        /**
+         * created by Smaster / twenty-four;
+         *  handleMessage(r, null)方法实现;
+         *
+         * */public void handleMessage(Message msg) {if (DEBUG_MESSAGES) Slog.v(TAG, ">>> handling: " + codeToString(msg.what));switch (msg.what) {
@@ -2172,9 +2200,20 @@ public final class ActivityThread {sendMessage(H.CLEAN_UP_CONTEXT, cci);}+    /**
+     * created by Smaster / twenty-six;
+     * 该方法最终完成activity的啓動;
+     * 主要完成六件事;
+     *
+     * . 
+     *
+     * */private Activity performLaunchActivity(ActivityClientRecord r, Intent customIntent) {// System.out.println("##### [" + System.currentTimeMillis() + "] ActivityThread.performLaunchActivity(" + r + ")");
-
+        /**
+         *
+         * 1.从ActivityClientRecord中获取待启动的Activity的组件信息;
+         * */ActivityInfo aInfo = r.activityInfo;if (r.packageInfo == null) {r.packageInfo = getPackageInfo(aInfo.applicationInfo, r.compatInfo,
@@ -2195,6 +2234,10 @@ public final class ActivityThread {Activity activity = null;try {
+            /**
+             * 2. 通过Instrumention的newActivity方法使用类加载器创建Activity对象;
+             *
+             * */java.lang.ClassLoader cl = r.packageInfo.getClassLoader();activity = mInstrumentation.newActivity(cl, component.getClassName(), r.intent);
@@ -2213,6 +2256,11 @@ public final class ActivityThread {}try {
+
+            /**
+             * 3. 创建Application 对象;
+             *
+             * */Application app = r.packageInfo.makeApplication(false, mInstrumentation);if (localLOGV) Slog.v(TAG, "Performing launch of " + r);
@@ -2224,6 +2272,12 @@ public final class ActivityThread {+ ", dir=" + r.packageInfo.getAppDir());if (activity != null) {
+                /**
+                 * 4. 创建ContextImpl 对象并通过Activity的attach方法来完成一些重要数据的初始化;
+                 * &emsp;Context的逻辑都是由ContexImpl来完成的。
+                 * &emsp;ContextImpl是通过activity的attach方法来和activity建立关联。
+                 * &emsp;
+                 * */Context appContext = createBaseContextForActivity(r, activity);CharSequence title = r.activityInfo.loadLabel(appContext.getPackageManager());Configuration config = new Configuration(mCompatConfiguration);
@@ -2248,6 +2302,9 @@ public final class ActivityThread {if (r.isPersistable()) {mInstrumentation.callActivityOnCreate(activity, r.state, r.persistentState);} else {
+                    /**
+                     * 5. finished;i成
+                     * */mInstrumentation.callActivityOnCreate(activity, r.state);}if (!activity.mCalled) {
@@ -2340,6 +2397,10 @@ public final class ActivityThread {return baseContext;}+    /**
+     * created by Smaster / twenty-five;
+     * ---> performLaunchActivity
+     * */private void handleLaunchActivity(ActivityClientRecord r, Intent customIntent) {// If we are getting ready to gc after going to the background, well// we are back active so skip it.
diff --git a/core/java/android/app/ApplicationThreadNative.java b/core/java/android/app/ApplicationThreadNative.java
index 0123e16..544c00d 100644
--- a/core/java/android/app/ApplicationThreadNative.java
+++ b/core/java/android/app/ApplicationThreadNative.java
@@ -678,6 +678,13 @@ public abstract class ApplicationThreadNative extends Binder}}+/**
+ * created by Smaster / twenty;
+ *  系统AIDL / 
+ *  ApplicationThreadNative 是 IApplicationThread&emsp;的实现者。
+ *  由于ApplicationThreadNative被定义为抽象类,&emsp;所以ApplicationThread就成
+ *  了IApplicationThread的最终实现者。
+ * */class ApplicationThreadProxy implements IApplicationThread {private final IBinder mRemote;diff --git a/core/java/android/app/IApplicationThread.java b/core/java/android/app/IApplicationThread.java
index f53075c..226fe31 100644
--- a/core/java/android/app/IApplicationThread.java
+++ b/core/java/android/app/IApplicationThread.java
@@ -47,6 +47,14 @@ import java.util.Map;** {@hide}*/
+
+/**
+ * created by Smaster / eighteen;
+ *  继承IInterface接口,所以它是&emsp;Binder 类型的接口。
+ *&emsp;包含大量启动&emsp;/ 停止&emsp;/ Activity的接口。&emsp;和&emsp;停止&emsp;/ 启动&emsp;服务的接口;
+
+ *   IApplicationThread 中的实现&emsp;---> &emsp;ActivityThread中内部类&emsp;ApplicationThread.
+ * */public interface IApplicationThread extends IInterface {void schedulePauseActivity(IBinder token, boolean finished, boolean userLeaving,int configChanges, boolean dontReport) throws RemoteException;
diff --git a/core/java/android/app/Instrumentation.java b/core/java/android/app/Instrumentation.java
index 60a013e..228f982 100644
--- a/core/java/android/app/Instrumentation.java
+++ b/core/java/android/app/Instrumentation.java
@@ -1482,6 +1482,10 @@ public class Instrumentation {intent.resolveTypeIfNeeded(who.getContentResolver()),token, target != null ? target.mEmbeddedID : null,requestCode, 0, null, options);
+            /**
+             * created by Smaster / five;
+             *  检查activity的启动结果
+             * */checkStartActivityResult(result, intent);} catch (RemoteException e) {}
@@ -1632,6 +1636,13 @@ public class Instrumentation {** {@hide}*/
+    /**
+     * created by Smaster / two;
+     *  ---> ActivityManagerNative.getDefault().startActivityAsUser();
+     *  AMS中实现;
+     *&emsp;AMS 继承&emsp;AMN , AMN继承Binder 并实现IActivityManager.
+     *  因此,AMS也是一个Binder, 它是IActivityManager的具体实现。
+     * */public ActivityResult execStartActivity(Context who, IBinder contextThread, IBinder token, Activity target,Intent intent, int requestCode, Bundle options, UserHandle user) {
@@ -1749,6 +1760,11 @@ public class Instrumentation {}/** @hide */
+    /**
+     * creatd by Smaster / six;
+     *  当无法正确启动一个Activity时,这个方法会抛出一个异常信息;
+     *&emsp;当待启动的Activity没有在AndroidManifest中注册时,&emsp;会抛出这个异常;
+     * */public static void checkStartActivityResult(int res, Object intent) {if (res >= ActivityManager.START_SUCCESS) {return;
diff --git a/services/core/java/com/android/server/am/ActivityManagerService.java b/services/core/java/com/android/server/am/ActivityManagerService.java
index 8dfb321..a20d5c3 100755
--- a/services/core/java/com/android/server/am/ActivityManagerService.java
+++ b/services/core/java/com/android/server/am/ActivityManagerService.java
@@ -3535,7 +3535,11 @@ public final class ActivityManagerService extends ActivityManagerNative}mProcessObservers.finishBroadcast();}
-
+    
+    /**
+     * created by Smaster / seven;
+     *
+     * */@Overridepublic final int startActivity(IApplicationThread caller, String callingPackage,Intent intent, String resolvedType, IBinder resultTo, String resultWho, int requestCode,
@@ -3545,6 +3549,10 @@ public final class ActivityManagerService extends ActivityManagerNativeUserHandle.getCallingUserId());}+    /**
+     * creatd by Smaster / eight;
+     * --> ActivityStackSupervisor startactivityMayWait方法;
+     * */@Overridepublic final int startActivityAsUser(IApplicationThread caller, String callingPackage,Intent intent, String resolvedType, IBinder resultTo, String resultWho, int requestCode,
diff --git a/services/core/java/com/android/server/am/ActivityStack.java b/services/core/java/com/android/server/am/ActivityStack.java
index e1b8278..dbe3249 100755
--- a/services/core/java/com/android/server/am/ActivityStack.java
+++ b/services/core/java/com/android/server/am/ActivityStack.java
@@ -1467,6 +1467,11 @@ final class ActivityStack {return resumeTopActivityLocked(prev, null);}+    /**
+     * created by Smaster / thirteen;
+     *   --> resumeTopActivityInnerLocked
+     *
+     * */final boolean resumeTopActivityLocked(ActivityRecord prev, Bundle options) {if (inResumeTopActivity) {// Don't even start recursing.
@@ -1483,7 +1488,12 @@ final class ActivityStack {}return result;}
-
+    
+    /**
+     * creatd by Smaster / fourteen;
+     *   --> ActivityStackSupervisor  startSpecificActivityLocked方法
+     *
+     * */final boolean resumeTopActivityInnerLocked(ActivityRecord prev, Bundle options) {if (ActivityManagerService.DEBUG_LOCKSCREEN) mService.logLockScreen("");diff --git a/services/core/java/com/android/server/am/ActivityStackSupervisor.java b/services/core/java/com/android/server/am/ActivityStackSupervisor.java
index 03dd3c0..e3c7ecb 100644
--- a/services/core/java/com/android/server/am/ActivityStackSupervisor.java
+++ b/services/core/java/com/android/server/am/ActivityStackSupervisor.java
@@ -810,6 +810,11 @@ public final class ActivityStackSupervisor implements DisplayListener {0, 0, 0, null, false, null, null, null);}+    /**
+     * created by Smaster / nine;
+     *  --> startActivityLocked;
+     * */
+final int startActivityMayWait(IApplicationThread caller, int callingUid,String callingPackage, Intent intent, String resolvedType,IVoiceInteractionSession voiceSession, IVoiceInteractor voiceInteractor,
@@ -1058,6 +1063,10 @@ public final class ActivityStackSupervisor implements DisplayListener {return ActivityManager.START_SUCCESS;}+    /**
+     * created by Smaster / sixteen;
+     *  
+     * */final boolean realStartActivityLocked(ActivityRecord r,ProcessRecord app, boolean andResume, boolean checkConfig)throws RemoteException {
@@ -1154,6 +1163,25 @@ public final class ActivityStackSupervisor implements DisplayListener {? new ProfilerInfo(profileFile, profileFd, mService.mSamplingInterval,mService.mAutoStopProfiler) : null;app.forceProcessStateUpTo(ActivityManager.PROCESS_STATE_TOP);
+            /* created by Smaster / seventeen;
+             *&emsp;总结: 
+             *       startActivityMayWait
+             *             |
+             *       startActivityLocked
+             *             |
+             *       startActivityUncheckedLocked    ---> resumeTopActivitiesLocked
+             *             | 
+             *       startSpecificActivityLocked     <--- resumeTopActivitiesLocked
+             *             |
+             *       realStartActivityLocked              ActivityStack;
+             *
+             *        ActivityStackSupervisor;
+             *
+             *
+             *
+             *        app.thread的类型为IApplicationThread
+             *
+             * **/app.thread.scheduleLaunchActivity(new Intent(r.intent), r.appToken,System.identityHashCode(r), r.info, new Configuration(mService.mConfiguration),r.compat, r.task.voiceInteractor, app.repProcState, r.icicle, r.persistentState,
@@ -1235,6 +1263,10 @@ public final class ActivityStackSupervisor implements DisplayListener {return true;}+    /**
+     * created by Smaster / fifteen;
+     *  -- > realStartActivityLocked;
+     * */void startSpecificActivityLocked(ActivityRecord r,boolean andResume, boolean checkConfig) {// Is this activity's application already running?
@@ -1269,6 +1301,11 @@ public final class ActivityStackSupervisor implements DisplayListener {"activity", r.intent.getComponent(), false, false, true);}+    /**
+     * created by Smaster / ten ;
+     *  --> startActivityUncheckedLocked方法;
+     *
+     * */final int startActivityLocked(IApplicationThread caller,Intent intent, String resolvedType, ActivityInfo aInfo,IVoiceInteractionSession voiceSession, IVoiceInteractor voiceInteractor,
@@ -1570,7 +1607,12 @@ public final class ActivityStackSupervisor implements DisplayListener {moveHomeStack(isHomeActivity);}}
-
+&emsp;&emsp;/**
+    *created by Smaster / eleven;
+    * 
+    * ---> resumeTopActivitiesLocked();
+    *
+    */&emsp;final int startActivityUncheckedLocked(ActivityRecord r, ActivityRecord sourceRecord,IVoiceInteractionSession voiceSession, IVoiceInteractor voiceInteractor, int startFlags,boolean doResume, Bundle options, TaskRecord inTask) {
@@ -2417,7 +2459,12 @@ public final class ActivityStackSupervisor implements DisplayListener {boolean resumeTopActivitiesLocked() {return resumeTopActivitiesLocked(null, null, null);}
-
+    
+    /**
+     * created by Smaster / twelve;
+     *  ---> ActivityStack&emsp;resumeTopActivityLocked;
+     *
+     * */boolean resumeTopActivitiesLocked(ActivityStack targetStack, ActivityRecord target,Bundle targetOptions) {if (targetStack == null) {
-- 
复制代码

我会逐渐增加注释

转载于:https://juejin.im/post/5b00315d51882542ad7743a2

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/254559.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

es6--箭头函数

基本用法 ES6允许使用“箭头”&#xff08;>&#xff09;定义函数。 var f v > v; 上面的箭头函数等同于&#xff1a; var f function(v) {return v; }; 如果箭头函数不需要参数或需要多个参数&#xff0c;就使用一个圆括号代表参数部分。 var f () > 5; // 等同于…

halcon Bit图位像素处理算子,持续更新

目录bit_andbit_lshiftbit_maskbit_notbit_orbit_rshiftbit_slicebit_xorbit_and 功能&#xff1a;输入图像的所有像素的逐位与。 bit_lshift 功能&#xff1a;图像的所有像素的左移。 bit_mask 功能&#xff1a;使用位掩码的每个像素的逻辑与。 bit_not 功能&#xff1…

NYOJ题目839合并

--------------------------- AC代码&#xff1a; 1 import java.util.Scanner;2 3 public class Main {4 5 public static void main(String[] args) {6 7 8 Scanner scnew Scanner(System.in);9 10 int timessc.nextInt(); 11 …

指针的魅力

序 指针说&#xff1a;love me&#xff0c;love me&#xff01; 但是他对指针说&#xff1a;I hate u&#xff0c;I hate u&#xff01; …… 指针仅仅是作为指针&#xff0c;我们可以把它当做有用的工具&#xff0c;为我们提供便利与好处。说起工具不得不让我想起一样东西—…

python多进程

2019独角兽企业重金招聘Python工程师标准>>> python多进程 进程简介 进程是程序在计算机上的一次执行活动。当你运行一个程序&#xff0c;你就启动了一个进程。显然&#xff0c;程序是死的(静态的)&#xff0c;进程是活的(动态的)。进程可以分为系统进程和用户进程。…

halcon彩色图像颜色处理算子,持续更新

目录apply_color_trans_lutcfa_to_rgbtrans_to_rgbclear_color_trans_lutcreate_color_trans_lutgen_principal_comp_translinear_trans_colorprincipal_comprgb1_to_grayrgb3_to_graytrans_from_rgbapply_color_trans_lut 功能&#xff1a;申请使用颜色查找表。 cfa_to_rgb …

夺命雷公狗---node.js---20之项目的构建在node+express+mongo的博客项目5mongodb在项目中实现添加数据...

我们上一步就引入了mongodb了&#xff0c;那么下一步就要开始写添加数据了&#xff0c;不过有个前提是先将表单的数据处理好&#xff1a; 最基本的这部现在已经成功了&#xff0c;因为最基本的这步就是先将表单处的提交方式和提交地址给处理好&#xff0c;这里和PHP的基本上是一…

重新绑定ItemsSource先设置ItemsSource = null;的原因

即报错信息为&#xff1a;在使用 ItemsSource 之前&#xff0c;项集合必须为空。原因&#xff1a;Items和ItemSource&#xff0c;只能有一个生效&#xff0c;想用其中一个&#xff0c;另一个必须是空。重新绑定ItemSource&#xff0c;虽然绑定的集合对象Clear了&#xff0c;但是…

敏捷开发学习

Scrum 敏捷开发&#xff0c;绩效管理&#xff0c;团队管理&#xff0c;企业管理&#xff0c;ASP.net MVC 敏捷开发 培训|咨询 工具开发 课题研讨 http://blog.csdn.net/cheny_com/article/category/794542 http://blog.csdn.net/vincetest/article/category/650747 http://blog…

Git commit后,本地代码丢失解决方法

问题描述&#xff1a; 提交代码时&#xff0c;rebase了两次&#xff0c;本地代码丢失了&#xff0c;吓得我差点跳起来。解决方法如下&#xff1a; 1、执行命令&#xff1a; git reflog d6ea731 (HEAD -> dev, origin/dev, master) HEAD{0}: checkout: moving from master to…

Edges图像边缘处理halcon算子,持续更新

目录close_edgesclose_edges_lengthderivate_gaussdiff_of_gaussedges_coloredges_color_sub_pixedges_imageedges_sub_pixfrei_ampfrei_dirhighpass_imageinfo_edgeskirsch_ampkirsch_dirlaplacelaplace_of_gaussprewitt_ampprewitt_dirrobertsrobinson_amprobinson_dirsobel_…

Android存储数据方式

可以查看Android开发文档中的&#xff1a;/docs/guide/topics/data/data-storage.html Android provides several options for you to save persistent application data. The solution you choose depends on your specific needs, such as whether the data should be privat…

防止cpu 一直被占用 sleep(0) 和 yield

在java的Thread类中有两个有用的函数&#xff0c;sleep和yield&#xff0c;sleep就是线程睡眠一定的时间&#xff0c;也就是交出cpu一段时间&#xff0c;yield用来暗示系统交出cpu控制权。这两个函数在多线程开发的时候特别有用&#xff0c;可以合理的分配cpu&#xff0c;提高程…

做一个有胆识的有为青年

1、一个年轻人&#xff0c;如果在这四年的时间里&#xff0c;没有任何想法&#xff0c;他这一生&#xff0c;就基本这个样子&#xff0c;没有多大改变了。 2、成功者就是胆识加魄力&#xff0c;曾经在火车上听人谈起过温州人的成功&#xff0c;说了这么三个字&#xff0c;“胆…

jstack应用-查找CPU飚高的原因

场景 在系统上线后&#xff0c;经常会遇到运维的同学跑过来说&#xff1a;“这次发版后&#xff0c;cpu线程使用率到一场&#xff0c;到100%了”。这时候不要慌&#xff0c;可以使用堆转储来分析到底是哪个线程引起的。 查找元凶 [rootjava_mofei_01 test]# top Mem: 16333644…

Enhancement增强图形halcon算子,持续更新

目录coherence_enhancing_diffemphasizeequ_histo_imageilluminatemean_curvature_flowscale_image_max_shock_filtercoherence_enhancing_diff 功能&#xff1a;执行一个图像的一个一致性增强扩散。 emphasize 功能&#xff1a;增强图像对比度。 equ_histo_image 功能&am…

音频中采样位数,采样率,比特率的名词解释(转)

采样位数&#xff08;采样大小&#xff09;&#xff1a; 采样位数可以理解为采集卡处理声音的解析度。这个数值越大&#xff0c;解析度就越高&#xff0c;录制和回放的声音就越真实。我们首先要知道&#xff1a;电脑中的声音文件是用数字0和1来表示的。所以在电脑上录音的本质就…

WebSocket实时异步通信

WebSocket实时异步通信 【一】WebSocket简介 WebSocket是HTML5推出一个协议规范&#xff0c;用来B/S模式中服务器端和客户端之间进行实时异步通信。 众所周知&#xff0c;传统的HTTP协议中&#xff0c;服务器端和客户端通信只能是在客户端发送一个请求之后&#xff0c;服务器端…

多线程和多进程的区别(小结)

分类&#xff1a; linux 2009-06-19 09:33 11501人阅读 评论(15) 收藏 举报 很想写点关于多进程和多线程的东西&#xff0c;我确实很爱他们。但是每每想动手写点关于他们的东西&#xff0c;却总是求全心理作祟&#xff0c;始终动不了手。 今天终于下了决心&#xff0c;写点东西…

redis-cli使用密码登录

redis-cli使用密码登录 注意IP地址要写正确&#xff01; 学习了: https://blog.csdn.net/lsm135/article/details/52932896 https://blog.csdn.net/zyz511919766/article/details/42268219 https://zhidao.baidu.com/question/756651357338691604.html 登录后 auth pass 或者 r…