色哟哟视频在线观看-色哟哟视频在线-色哟哟欧美15最新在线-色哟哟免费在线观看-国产l精品国产亚洲区在线观看-国产l精品国产亚洲区久久

0
  • 聊天消息
  • 系統消息
  • 評論與回復
登錄后你可以
  • 下載海量資料
  • 學習在線課程
  • 觀看技術視頻
  • 寫文章/發帖/加入社區
會員中心
电子发烧友
开通电子发烧友VIP会员 尊享10大特权
海量资料免费下载
精品直播免费看
优质内容免费畅学
课程9折专享价
創作中心

完善資料讓更多小伙伴認識你,還能領取20積分哦,立即完善>

3天內不再提示

異步神器CompletableFuture萬字詳解!

jf_ro2CN3Fa ? 來源:CSDN ? 作者:CSDN ? 2022-11-15 10:15 ? 次閱讀
加入交流群
微信小助手二維碼

掃碼添加小助手

加入工程師交流群


CompletableFuture是jdk8的新特性。CompletableFuture實現了CompletionStage接口和Future接口,前者是對后者的一個擴展,增加了異步會點、流式處理、多個Future組合處理的能力,使Java在處理多任務的協同工作時更加順暢便利。

一、創建異步任務

1. supplyAsync

supplyAsync是創建帶有返回值的異步任務。它有如下兩個方法,一個是使用默認線程池(ForkJoinPool.commonPool())的方法,一個是帶有自定義線程池的重載方法

//帶返回值異步請求,默認線程池
publicstaticCompletableFuturesupplyAsync(Suppliersupplier)

//帶返回值的異步請求,可以自定義線程池
publicstaticCompletableFuturesupplyAsync(Suppliersupplier,Executorexecutor)

測試代碼:

publicstaticvoidmain(String[]args)throwsExecutionException,InterruptedException{
CompletableFuturecf=CompletableFuture.supplyAsync(()->{
System.out.println("dosomething....");
return"result";
});

//等待任務執行完成
System.out.println("結果->"+cf.get());
}


publicstaticvoidmain(String[]args)throwsExecutionException,InterruptedException{
//自定義線程池
ExecutorServiceexecutorService=Executors.newSingleThreadExecutor();
CompletableFuturecf=CompletableFuture.supplyAsync(()->{
System.out.println("dosomething....");
return"result";
},executorService);

//等待子任務執行完成
System.out.println("結果->"+cf.get());
}

測試結果:

90bc4a4e-648a-11ed-8abf-dac502259ad0.png

2. runAsync

runAsync是創建沒有返回值的異步任務。它有如下兩個方法,一個是使用默認線程池(ForkJoinPool.commonPool())的方法,一個是帶有自定義線程池的重載方法

//不帶返回值的異步請求,默認線程池
publicstaticCompletableFuturerunAsync(Runnablerunnable)

//不帶返回值的異步請求,可以自定義線程池
publicstaticCompletableFuturerunAsync(Runnablerunnable,Executorexecutor)

測試代碼:

publicstaticvoidmain(String[]args)throwsExecutionException,InterruptedException{
CompletableFuturecf=CompletableFuture.runAsync(()->{
System.out.println("dosomething....");
});

//等待任務執行完成
System.out.println("結果->"+cf.get());
}


publicstaticvoidmain(String[]args)throwsExecutionException,InterruptedException{
//自定義線程池
ExecutorServiceexecutorService=Executors.newSingleThreadExecutor();
CompletableFuturecf=CompletableFuture.runAsync(()->{
System.out.println("dosomething....");
},executorService);

//等待任務執行完成
System.out.println("結果->"+cf.get());
}

測試結果:

90e0da4e-648a-11ed-8abf-dac502259ad0.png

3.獲取任務結果的方法

//如果完成則返回結果,否則就拋出具體的異常
publicTget()throwsInterruptedException,ExecutionException

//最大時間等待返回結果,否則就拋出具體異常
publicTget(longtimeout,TimeUnitunit)throwsInterruptedException,ExecutionException,TimeoutException

//完成時返回結果值,否則拋出unchecked異常。為了更好地符合通用函數形式的使用,如果完成此CompletableFuture所涉及的計算引發異常,則此方法將引發unchecked異常并將底層異常作為其原因
publicTjoin()

//如果完成則返回結果值(或拋出任何遇到的異常),否則返回給定的valueIfAbsent。
publicTgetNow(TvalueIfAbsent)

//如果任務沒有完成,返回的值設置為給定值
publicbooleancomplete(Tvalue)

//如果任務沒有完成,就拋出給定異常
publicbooleancompleteExceptionally(Throwableex)

基于 Spring Boot + MyBatis Plus + Vue & Element 實現的后臺管理系統 + 用戶小程序,支持 RBAC 動態權限、多租戶、數據權限、工作流、三方登錄、支付、短信、商城等功能

  • 項目地址:https://github.com/YunaiV/ruoyi-vue-pro
  • 視頻教程:https://doc.iocoder.cn/video/

二、異步回調處理

1. thenApply和thenApplyAsync

thenApply 表示某個任務執行完成后執行的動作,即回調方法,會將該任務的執行結果即方法返回值作為入參傳遞到回調方法中,帶有返回值。

測試代碼:

publicstaticvoidmain(String[]args)throwsExecutionException,InterruptedException{
CompletableFuturecf1=CompletableFuture.supplyAsync(()->{
System.out.println(Thread.currentThread()+"cf1dosomething....");
return1;
});

CompletableFuturecf2=cf1.thenApplyAsync((result)->{
System.out.println(Thread.currentThread()+"cf2dosomething....");
result+=2;
returnresult;
});
//等待任務1執行完成
System.out.println("cf1結果->"+cf1.get());
//等待任務2執行完成
System.out.println("cf2結果->"+cf2.get());
}

publicstaticvoidmain(String[]args)throwsExecutionException,InterruptedException{
CompletableFuturecf1=CompletableFuture.supplyAsync(()->{
System.out.println(Thread.currentThread()+"cf1dosomething....");
return1;
});

CompletableFuturecf2=cf1.thenApply((result)->{
System.out.println(Thread.currentThread()+"cf2dosomething....");
result+=2;
returnresult;
});
//等待任務1執行完成
System.out.println("cf1結果->"+cf1.get());
//等待任務2執行完成
System.out.println("cf2結果->"+cf2.get());
}

測試結果:

9114db50-648a-11ed-8abf-dac502259ad0.png 914c3bd6-648a-11ed-8abf-dac502259ad0.png

從上面代碼和測試結果我們發現thenApply和thenApplyAsync區別在于,使用thenApply方法時子任務與父任務使用的是同一個線程,而thenApplyAsync在子任務中是另起一個線程執行任務,并且thenApplyAsync可以自定義線程池,默認的使用ForkJoinPool.commonPool()線程池。

2. thenAccept和thenAcceptAsync

thenAccep表示某個任務執行完成后執行的動作,即回調方法,會將該任務的執行結果即方法返回值作為入參傳遞到回調方法中,無返回值。

測試代碼

publicstaticvoidmain(String[]args)throwsExecutionException,InterruptedException{
CompletableFuturecf1=CompletableFuture.supplyAsync(()->{
System.out.println(Thread.currentThread()+"cf1dosomething....");
return1;
});

CompletableFuturecf2=cf1.thenAccept((result)->{
System.out.println(Thread.currentThread()+"cf2dosomething....");
});

//等待任務1執行完成
System.out.println("cf1結果->"+cf1.get());
//等待任務2執行完成
System.out.println("cf2結果->"+cf2.get());
}


publicstaticvoidmain(String[]args)throwsExecutionException,InterruptedException{
CompletableFuturecf1=CompletableFuture.supplyAsync(()->{
System.out.println(Thread.currentThread()+"cf1dosomething....");
return1;
});

CompletableFuturecf2=cf1.thenAcceptAsync((result)->{
System.out.println(Thread.currentThread()+"cf2dosomething....");
});

//等待任務1執行完成
System.out.println("cf1結果->"+cf1.get());
//等待任務2執行完成
System.out.println("cf2結果->"+cf2.get());
}

測試結果:

915c4ad0-648a-11ed-8abf-dac502259ad0.png 917f8ce8-648a-11ed-8abf-dac502259ad0.png從上面代碼和測試結果我們發現thenAccep和thenAccepAsync區別在于,使用thenAccep方法時子任務與父任務使用的是同一個線程,而thenAccepAsync在子任務中可能是另起一個線程執行任務,并且thenAccepAsync可以自定義線程池,默認的使用ForkJoinPool.commonPool()線程池。

3.thenRun和thenRunAsync

thenRun表示某個任務執行完成后執行的動作,即回調方法,無入參,無返回值。

測試代碼:

publicstaticvoidmain(String[]args)throwsExecutionException,InterruptedException{
CompletableFuturecf1=CompletableFuture.supplyAsync(()->{
System.out.println(Thread.currentThread()+"cf1dosomething....");
return1;
});

CompletableFuturecf2=cf1.thenRun(()->{
System.out.println(Thread.currentThread()+"cf2dosomething....");
});

//等待任務1執行完成
System.out.println("cf1結果->"+cf1.get());
//等待任務2執行完成
System.out.println("cf2結果->"+cf2.get());
}

publicstaticvoidmain(String[]args)throwsExecutionException,InterruptedException{
CompletableFuturecf1=CompletableFuture.supplyAsync(()->{
System.out.println(Thread.currentThread()+"cf1dosomething....");
return1;
});

CompletableFuturecf2=cf1.thenRunAsync(()->{
System.out.println(Thread.currentThread()+"cf2dosomething....");
});

//等待任務1執行完成
System.out.println("cf1結果->"+cf1.get());
//等待任務2執行完成
System.out.println("cf2結果->"+cf2.get());
}

測試結果:

919bd614-648a-11ed-8abf-dac502259ad0.png91aa1882-648a-11ed-8abf-dac502259ad0.png

從上面代碼和測試結果我們發現thenRun和thenRunAsync區別在于,使用thenRun方法時子任務與父任務使用的是同一個線程,而thenRunAsync在子任務中可能是另起一個線程執行任務,并且thenRunAsync可以自定義線程池,默認的使用ForkJoinPool.commonPool()線程池。

4.whenComplete和whenCompleteAsync

whenComplete是當某個任務執行完成后執行的回調方法,會將執行結果或者執行期間拋出的異常傳遞給回調方法,如果是正常執行則異常為null,回調方法對應的CompletableFuture的result和該任務一致,如果該任務正常執行,則get方法返回執行結果,如果是執行異常,則get方法拋出異常。

測試代碼:

publicstaticvoidmain(String[]args)throwsExecutionException,InterruptedException{
CompletableFuturecf1=CompletableFuture.supplyAsync(()->{
System.out.println(Thread.currentThread()+"cf1dosomething....");
inta=1/0;
return1;
});

CompletableFuturecf2=cf1.whenComplete((result,e)->{
System.out.println("上個任務結果:"+result);
System.out.println("上個任務拋出異常:"+e);
System.out.println(Thread.currentThread()+"cf2dosomething....");
});

////等待任務1執行完成
//System.out.println("cf1結果->"+cf1.get());
////等待任務2執行完成
System.out.println("cf2結果->"+cf2.get());
}

測試結果:

91b85c44-648a-11ed-8abf-dac502259ad0.png

whenCompleteAsync和whenComplete區別也是whenCompleteAsync可能會另起一個線程執行任務,并且thenRunAsync可以自定義線程池,默認的使用ForkJoinPool.commonPool()線程池。

5.handle和handleAsync

跟whenComplete基本一致,區別在于handle的回調方法有返回值。

測試代碼:

publicstaticvoidmain(String[]args)throwsExecutionException,InterruptedException{
CompletableFuturecf1=CompletableFuture.supplyAsync(()->{
System.out.println(Thread.currentThread()+"cf1dosomething....");
//inta=1/0;
return1;
});

CompletableFuturecf2=cf1.handle((result,e)->{
System.out.println(Thread.currentThread()+"cf2dosomething....");
System.out.println("上個任務結果:"+result);
System.out.println("上個任務拋出異常:"+e);
returnresult+2;
});

//等待任務2執行完成
System.out.println("cf2結果->"+cf2.get());
}

測試結果 :

91dba032-648a-11ed-8abf-dac502259ad0.png

基于 Spring Cloud Alibaba + Gateway + Nacos + RocketMQ + Vue & Element 實現的后臺管理系統 + 用戶小程序,支持 RBAC 動態權限、多租戶、數據權限、工作流、三方登錄、支付、短信、商城等功能

  • 項目地址:https://github.com/YunaiV/yudao-cloud
  • 視頻教程:https://doc.iocoder.cn/video/

三、多任務組合處理

1. thenCombine、thenAcceptBoth 和runAfterBoth

這三個方法都是將兩個CompletableFuture組合起來處理,只有兩個任務都正常完成時,才進行下階段任務。

區別:thenCombine會將兩個任務的執行結果作為所提供函數的參數,且該方法有返回值;thenAcceptBoth同樣將兩個任務的執行結果作為方法入參,但是無返回值;runAfterBoth沒有入參,也沒有返回值。注意兩個任務中只要有一個執行異常,則將該異常信息作為指定任務的執行結果。

測試代碼:

publicstaticvoidmain(String[]args)throwsExecutionException,InterruptedException{
CompletableFuturecf1=CompletableFuture.supplyAsync(()->{
System.out.println(Thread.currentThread()+"cf1dosomething....");
return1;
});

CompletableFuturecf2=CompletableFuture.supplyAsync(()->{
System.out.println(Thread.currentThread()+"cf2dosomething....");
return2;
});

CompletableFuturecf3=cf1.thenCombine(cf2,(a,b)->{
System.out.println(Thread.currentThread()+"cf3dosomething....");
returna+b;
});

System.out.println("cf3結果->"+cf3.get());
}

publicstaticvoidmain(String[]args)throwsExecutionException,InterruptedException{
CompletableFuturecf1=CompletableFuture.supplyAsync(()->{
System.out.println(Thread.currentThread()+"cf1dosomething....");
return1;
});

CompletableFuturecf2=CompletableFuture.supplyAsync(()->{
System.out.println(Thread.currentThread()+"cf2dosomething....");
return2;
});

CompletableFuturecf3=cf1.thenAcceptBoth(cf2,(a,b)->{
System.out.println(Thread.currentThread()+"cf3dosomething....");
System.out.println(a+b);
});

System.out.println("cf3結果->"+cf3.get());
}

publicstaticvoidmain(String[]args)throwsExecutionException,InterruptedException{
CompletableFuturecf1=CompletableFuture.supplyAsync(()->{
System.out.println(Thread.currentThread()+"cf1dosomething....");
return1;
});

CompletableFuturecf2=CompletableFuture.supplyAsync(()->{
System.out.println(Thread.currentThread()+"cf2dosomething....");
return2;
});

CompletableFuturecf3=cf1.runAfterBoth(cf2,()->{
System.out.println(Thread.currentThread()+"cf3dosomething....");
});

System.out.println("cf3結果->"+cf3.get());
}

測試結果:

91f51922-648a-11ed-8abf-dac502259ad0.png9211a330-648a-11ed-8abf-dac502259ad0.png

92274e9c-648a-11ed-8abf-dac502259ad0.png 2.applyToEither、acceptEither和runAfterEither

這三個方法和上面一樣也是將兩個CompletableFuture組合起來處理,當有一個任務正常完成時,就會進行下階段任務。

區別:applyToEither會將已經完成任務的執行結果作為所提供函數的參數,且該方法有返回值;acceptEither同樣將已經完成任務的執行結果作為方法入參,但是無返回值;runAfterEither沒有入參,也沒有返回值。

測試代碼:

publicstaticvoidmain(String[]args)throwsExecutionException,InterruptedException{
CompletableFuturecf1=CompletableFuture.supplyAsync(()->{
try{
System.out.println(Thread.currentThread()+"cf1dosomething....");
Thread.sleep(2000);
}catch(InterruptedExceptione){
e.printStackTrace();
}
return"cf1任務完成";
});

CompletableFuturecf2=CompletableFuture.supplyAsync(()->{
try{
System.out.println(Thread.currentThread()+"cf2dosomething....");
Thread.sleep(5000);
}catch(InterruptedExceptione){
e.printStackTrace();
}
return"cf2任務完成";
});

CompletableFuturecf3=cf1.applyToEither(cf2,(result)->{
System.out.println("接收到"+result);
System.out.println(Thread.currentThread()+"cf3dosomething....");
return"cf3任務完成";
});

System.out.println("cf3結果->"+cf3.get());
}


publicstaticvoidmain(String[]args)throwsExecutionException,InterruptedException{
CompletableFuturecf1=CompletableFuture.supplyAsync(()->{
try{
System.out.println(Thread.currentThread()+"cf1dosomething....");
Thread.sleep(2000);
}catch(InterruptedExceptione){
e.printStackTrace();
}
return"cf1任務完成";
});

CompletableFuturecf2=CompletableFuture.supplyAsync(()->{
try{
System.out.println(Thread.currentThread()+"cf2dosomething....");
Thread.sleep(5000);
}catch(InterruptedExceptione){
e.printStackTrace();
}
return"cf2任務完成";
});

CompletableFuturecf3=cf1.acceptEither(cf2,(result)->{
System.out.println("接收到"+result);
System.out.println(Thread.currentThread()+"cf3dosomething....");
});

System.out.println("cf3結果->"+cf3.get());
}

publicstaticvoidmain(String[]args)throwsExecutionException,InterruptedException{
CompletableFuturecf1=CompletableFuture.supplyAsync(()->{
try{
System.out.println(Thread.currentThread()+"cf1dosomething....");
Thread.sleep(2000);
}catch(InterruptedExceptione){
e.printStackTrace();
}
System.out.println("cf1任務完成");
return"cf1任務完成";
});

CompletableFuturecf2=CompletableFuture.supplyAsync(()->{
try{
System.out.println(Thread.currentThread()+"cf2dosomething....");
Thread.sleep(5000);
}catch(InterruptedExceptione){
e.printStackTrace();
}
System.out.println("cf2任務完成");
return"cf2任務完成";
});

CompletableFuturecf3=cf1.runAfterEither(cf2,()->{
System.out.println(Thread.currentThread()+"cf3dosomething....");
System.out.println("cf3任務完成");
});

System.out.println("cf3結果->"+cf3.get());
}

測試結果:

92418438-648a-11ed-8abf-dac502259ad0.png925d7cc4-648a-11ed-8abf-dac502259ad0.png

從上面可以看出cf1任務完成需要2秒,cf2任務完成需要5秒,使用applyToEither組合兩個任務時,只要有其中一個任務完成時,就會執行cf3任務,顯然cf1任務先完成了并且將自己任務的結果傳值給了cf3任務,cf3任務中打印了接收到cf1任務完成,接著完成自己的任務,并返回cf3任務完成;acceptEither和runAfterEither類似,acceptEither會將cf1任務的結果作為cf3任務的入參,但cf3任務完成時并無返回值;runAfterEither不會將cf1任務的結果作為cf3任務的入參,它是沒有任務入參,執行完自己的任務后也并無返回值。

2. allOf / anyOf

allOf:CompletableFuture是多個任務都執行完成后才會執行,只有有一個任務執行異常,則返回的CompletableFuture執行get方法時會拋出異常,如果都是正常執行,則get返回null。

anyOf :CompletableFuture是多個任務只要有一個任務執行完成,則返回的CompletableFuture執行get方法時會拋出異常,如果都是正常執行,則get返回執行完成任務的結果。

測試代碼:

publicstaticvoidmain(String[]args)throwsExecutionException,InterruptedException{
CompletableFuturecf1=CompletableFuture.supplyAsync(()->{
try{
System.out.println(Thread.currentThread()+"cf1dosomething....");
Thread.sleep(2000);
}catch(InterruptedExceptione){
e.printStackTrace();
}
System.out.println("cf1任務完成");
return"cf1任務完成";
});

CompletableFuturecf2=CompletableFuture.supplyAsync(()->{
try{
System.out.println(Thread.currentThread()+"cf2dosomething....");
inta=1/0;
Thread.sleep(5000);
}catch(InterruptedExceptione){
e.printStackTrace();
}
System.out.println("cf2任務完成");
return"cf2任務完成";
});

CompletableFuturecf3=CompletableFuture.supplyAsync(()->{
try{
System.out.println(Thread.currentThread()+"cf2dosomething....");
Thread.sleep(3000);
}catch(InterruptedExceptione){
e.printStackTrace();
}
System.out.println("cf3任務完成");
return"cf3任務完成";
});

CompletableFuturecfAll=CompletableFuture.allOf(cf1,cf2,cf3);
System.out.println("cfAll結果->"+cfAll.get());
}


publicstaticvoidmain(String[]args)throwsExecutionException,InterruptedException{
CompletableFuturecf1=CompletableFuture.supplyAsync(()->{
try{
System.out.println(Thread.currentThread()+"cf1dosomething....");
Thread.sleep(2000);
}catch(InterruptedExceptione){
e.printStackTrace();
}
System.out.println("cf1任務完成");
return"cf1任務完成";
});

CompletableFuturecf2=CompletableFuture.supplyAsync(()->{
try{
System.out.println(Thread.currentThread()+"cf2dosomething....");
Thread.sleep(5000);
}catch(InterruptedExceptione){
e.printStackTrace();
}
System.out.println("cf2任務完成");
return"cf2任務完成";
});

CompletableFuturecf3=CompletableFuture.supplyAsync(()->{
try{
System.out.println(Thread.currentThread()+"cf2dosomething....");
Thread.sleep(3000);
}catch(InterruptedExceptione){
e.printStackTrace();
}
System.out.println("cf3任務完成");
return"cf3任務完成";
});

CompletableFuturecfAll=CompletableFuture.anyOf(cf1,cf2,cf3);
System.out.println("cfAll結果->"+cfAll.get());
}

		

測試結果:

9278b9a8-648a-11ed-8abf-dac502259ad0.png928fa848-648a-11ed-8abf-dac502259ad0.png

審核編輯 :李倩


聲明:本文內容及配圖由入駐作者撰寫或者入駐合作網站授權轉載。文章觀點僅代表作者本人,不代表電子發燒友網立場。文章及其配圖僅供工程師學習之用,如有內容侵權或者其他違規問題,請聯系本站處理。 舉報投訴
  • 接口
    +關注

    關注

    33

    文章

    9015

    瀏覽量

    153822
  • 線程
    +關注

    關注

    0

    文章

    508

    瀏覽量

    20285

原文標題:一網打盡:異步神器 CompletableFuture 萬字詳解!

文章出處:【微信號:芋道源碼,微信公眾號:芋道源碼】歡迎添加關注!文章轉載請注明出處。

收藏 0人收藏
加入交流群
微信小助手二維碼

掃碼添加小助手

加入工程師交流群

    評論

    相關推薦
    熱點推薦

    萬字全文科普:什么是IP?

    半導體行業在一個復雜且快速發展的生態系統中運作,并由持續創新驅動。該生態系統的核心是半導體價值鏈,它包含幾個關鍵階段:芯片設計、晶圓制造、最終組裝和原材料采購。每個階段對于半導體器件的生產和功能都至關重要。IP提供商在這一框架中發揮著關鍵作用,尤其是在芯片設計階段,該階段是整個價值鏈的基礎。他們提供專業的尖端技術,以增強創新、促進無縫集成、確保合規性并加快產
    的頭像 發表于 07-21 09:53 ?110次閱讀
    <b class='flag-5'>萬字</b>全文科普:什么是IP?

    萬字長文】物聯網的激蕩二十年

    2005年11月,在突尼斯舉辦的信息社會世界峰會(WSIS)上,國際電信聯盟(ITU)發布了一份名為《ITU互聯網報告2005:物聯網》,正式向世人展示了什么是“物聯網(InternetofThings)”。雖然業界一致認為,1999年,麻省理工學院的KevinAshton首次提出”物聯網”這一術語,但僅僅只是一個理念,沒有成體系的解釋,也無法形成共識。而I
    的頭像 發表于 06-27 13:42 ?807次閱讀
    【<b class='flag-5'>萬字</b>長文】物聯網的激蕩二十年

    (ST大賽三等獎作品)超聲波自拍神器實例項目

    (ST大賽三等獎作品)超聲波自拍神器電路圖:
    發表于 05-28 21:04

    MAX14830四通道串行UART,具有128FIFO技術手冊

    MAX14830是一款先進的四通道通用異步收發器(UART),每路UART帶有128先入/先出(FIFO)接收和發送緩存器,以及高速串行外設接口(SPI?)或I2C控制器接口。PLL和分數波特率發生器為波特率編程和參考時鐘選擇提供了極大靈活性。
    的頭像 發表于 05-22 10:14 ?317次閱讀
    MAX14830四通道串行UART,具有128<b class='flag-5'>字</b>FIFO技術手冊

    全面解析新概念模擬電路(建議下載?。?/a>

    全文共五冊,近50萬字,一樣的風趣幽默,一樣的social化語言,深入淺出地將枯燥深奧的模電知識講得簡單易學。 《新概念模擬電路》內容包含了《晶體管》、《負反饋和運算放大器》、《運放電路的頻率特性
    發表于 04-16 13:37

    萬字聊聊什么是智能車載終端?為什么智駕發展離不開它?

    智能車載終端作為車聯網技術的核心,近年來發展迅速,已成為汽車智能化和自動駕駛領域的關鍵支撐技術。其核心功能涵蓋智能導航、實時通信、娛樂互動、安全監控等,為駕駛者和乘客提供全面的服務支持。隨著自動駕駛和智能網聯汽車的發展需求不斷增長,智能車載終端的市場規模快速擴展,同時也面臨技術創新、市場競爭、產業鏈協同及政策規范等多重挑戰。 ? 引言 智能車載終端作為汽車智能化發展的核心技術之一,其重要性日益凸顯。在汽
    的頭像 發表于 03-31 09:12 ?5773次閱讀
    <b class='flag-5'>萬字</b>聊聊什么是智能車載終端?為什么智駕發展離不開它?

    投資筆記:3萬字詳解100大新材料國產替代(附100+行研報告)

    新材料/半導體/新能源/光伏/顯示材料等正文半導體晶圓制造材料(11種)先進封裝材料(12種)半導體零部件材料(3種)顯示材料(11種)高性能纖維(12種)工程塑料(13種)高性能膜材(6種)先進陶瓷材料(9種)高性能合金(4種)一、半導體晶圓制造材料1、
    的頭像 發表于 02-16 07:54 ?4134次閱讀
    投資筆記:3<b class='flag-5'>萬字</b><b class='flag-5'>詳解</b>100大新材料國產替代(附100+行研報告)

    Xmind完成對AI總結工具Briefy的戰略收購

    全球知名的知識管理企業Xmind近日宣布,已完成對AI總結工具Briefy的戰略收購。Briefy以其強大的大語言模型驅動的多模態解析技術著稱,能夠將長視頻和萬字文檔等復雜信息轉化為結構清晰的大綱或思維導圖,并通過知識庫功能幫助用戶高效消化和管理知識。
    的頭像 發表于 02-13 16:01 ?533次閱讀

    萬字長文!工業5.0的內涵、體系架構和使能技術

    摘要: 工業4.0誕生以來,強化了數字化、數據驅動和互聯的工業所帶來的高度變革性影響。但是工業4.0沒有強調工業在全球范圍內為人類提供長期服務的重要性,也沒有很好解決如何利用技術創新來促進工業與社會之間的協作和“雙贏”互動等問題。工業5.0系統地提出將勞動者作為工業生產的核心,從而實現就業和增長之外的社會目標,穩健地提供繁榮。但是,工業5.0作為對工業未來發展的再思考,目前其研究尚處于探索階段,研究成果相對較少且缺乏
    的頭像 發表于 02-05 11:30 ?1126次閱讀
    <b class='flag-5'>萬字</b>長文!工業5.0的內涵、體系架構和使能技術

    異步串行接口有哪些,異步串行接口為何需要波特率

    在現代電子通信領域,異步串行接口作為數據交換的一種基本方式,廣泛應用于各種嵌入式系統、計算機設備以及遠程通信網絡中。本文將深入探討異步串行接口的主要類型,并解析為何波特率在異步串行通信中扮演著至關重要的角色。
    的頭像 發表于 01-29 14:47 ?959次閱讀

    萬字長文,看懂激光基礎知識!

    深入介紹激光基礎知識,幫助您輕松理解激光領域的關鍵概念和原理。
    的頭像 發表于 12-20 09:49 ?1119次閱讀
    <b class='flag-5'>萬字</b>長文,看懂激光基礎知識!

    套接socket包含哪些參數

    套接(Socket)是計算機網絡中最基本的通信抽象,它定義了兩個進程間通信的端點。在TCP/IP協議棧中,套接是實現網絡通信的核心組件。 套接的基本概念 套接是一種通信端點,它
    的頭像 發表于 08-16 11:02 ?1080次閱讀

    第三篇-V1.5 TB6612電機pwm控制STM32智能小車 STM32F103C8T6單片機

    通過合理的硬件設計和詳細的視頻筆記介紹,硬件使用STM32F103主控資料多方便學習,通過3萬字筆記、12多個小時視頻、20多章節代碼手把手教會你如何開發和調試。
    的頭像 發表于 08-12 18:29 ?2912次閱讀
    第三篇-V1.5 TB6612電機pwm控制STM32智能小車 STM32F103C8T6單片機

    第一篇:V1.5-STM32f103c8t6智能小車筆記 標準庫開發 6612電機驅動新手入門項目

    這是全網最詳細、性價比最高的STM32實戰項目入門教程,通過合理的硬件設計和詳細的視頻筆記介紹,硬件使用STM32F103主控資料多方便學習,通過3萬字筆記、12多個小時視頻、20多章節代碼手把手教會你如何開發和調試。讓你更快掌握嵌入式系統開發。
    的頭像 發表于 08-12 18:25 ?2635次閱讀
    第一篇:V1.5-STM32f103c8t6智能小車筆記 標準庫開發 6612電機驅動新手入門項目

    Java CompletableFuture 異步超時實現探索

    簡介 JDK 8 中 CompletableFuture 沒有超時中斷任務的能力?,F有做法強依賴任務自身的超時實現。本文提出一種異步超時實現方案,解決上述問題。 前言 JDK 8 是一次重大的版本
    的頭像 發表于 07-25 14:06 ?685次閱讀
    主站蜘蛛池模板: 超碰免费视频在线观看 | 哪灬你的鸣巴好大 | 挺弄抽插喷射HH | 99亚洲精品色情无码久久 | 伊人影院亚洲 | GOGOGO高清在线播放免费 | 海量激情文学 | 久久人妻少妇嫩草AV蜜桃99 | 精品国产mmd在线观看 | 欧美一区二区激情视频 | 精品久久久久久无码人妻国产馆 | 空姐内射出白浆10p 空姐厕所啪啪啪 | 免费观看美女的网站 | 曰本熟妇乱妇色A片在线 | 伊人AV一区二区三区夜色撩人 | 妹妹成人网 | 男人J进入女人P免费狂躁 | 中文字幕亚洲综合小综合在线 | 亚洲AV國產国产久青草 | 久久爱狠狠综合网 | 第一次处破女完整版电影 | 日本xxxx69动漫 | 成人在线视频免费观看 | 99E久热只有精品8在线直播 | 日日噜噜夜夜爽爽 | 四虎视频最新视频在线观看 | 92精品国产成人观看免费 | a级老头和老太xxxx | 亚洲一区二区影院 | 亚洲成A人片在线观看中文L | 国产成人精品免费视频下载 | 大胸女晃奶动态图 | 高挑人妻无奈张开腿 | 免费看黄的片多多APP下载 | 蜜芽最新域名解析网站 | 高清欧美性猛交xxxx黑人猛交 | A级超碰视频在线观看 | 国产精品99久久久久久AV下载 | 亚洲不卡视频在线观看 | 久 久 亚洲 少 妇 无 码 | 国产精品久久免费视频 |

    電子發燒友

    中國電子工程師最喜歡的網站

    • 2931785位工程師會員交流學習
    • 獲取您個性化的科技前沿技術信息
    • 參加活動獲取豐厚的禮品