tag channel

標籤
貢獻19
91
09:55 AM · Nov 04 ,2025

@channel / 博客 RSS 訂閱

coding進階 - Go Quiz: 從Go面試題看channel在select場景下的注意事項

面試題 這是Go Quiz系列中關於channel的第2篇,涉及channel被close後的特性,以及在select和channel一起使用時的注意事項。 這道題目來源於Google的工程師Valentin Deleplace。 package main import "fmt" func main() { data := make(chan int) shutdown :=

channel , 面試 , 面試問題 , select , go

收藏 評論

天策上將 - [go] chan close

close chan close由發送端調用,在收到最後一個發送值後關閉管道(It should be executed only by the sender, never the receiver, and has the effect of shutting down the channel after the last sent value is received) close管道後,

channel , go

收藏 評論

flydean - netty系列之:可以自動通知執行結果的Future,有見過嗎?

簡介 在我的心中,JDK有兩個經典版本,第一個就是現在大部分公司都在使用的JDK8,這個版本引入了Stream、lambda表達式和泛型,讓JAVA程序的編寫變得更加流暢,減少了大量的冗餘代碼。 另外一個版本要早點,還是JAVA 1.X的時代,我們稱之為JDK1.5,這個版本引入了java.util.concurrent併發包,從此在JAVA中可以愉快的使用異步編程。 雖然先JDK已經發展到了17

channel , netty , JAVA

收藏 評論