Processing mechanism of chansend/chanrecv when Go channel - block is false
Preface
This article aggregates the specific processing of send and recv when selecting 2 cases (1 send/recv case, 1 default case).
For more content sharing, please follow the Public Number: Go Development Notes
chansend
select {
case c <- v:
... foo
default:
... bar
}
The bottom corresponding func is selectnbsend.
selectnbsend
// ...
Added by justinma on Wed, 09 Feb 2022 08:18:10 +0200
Go language Bible - Chapter 9 concurrency based on shared variables - 9.7 example: concurrent non blocking cache
Chapter 9 concurrency based on shared variables
In the previous chapter, we used direct and natural methods such as goroutine and channel to implement concurrency. Sometimes they have some problems
In this chapter, we will introduce the concurrency mechanism in more detail, especially the sharing of variables between goroutines. We will also ...
Added by ManOnScooter on Sat, 22 Jan 2022 11:09:47 +0200
netty series: a good horse is equipped with a good saddle, and a matching selector is selected for the channel
brief introductionWe know that the foundation of netty is channel and the selector on channel. Of course, as a nio framework, channel and selector are not only the foundation of netty, but also the foundation of all nio implementations.Similarly, we know that netty has many different protocols. These protocols communicate on the channel. Will t ...
Added by mindspin311 on Fri, 21 Jan 2022 22:10:49 +0200