Tag: go

Throttling Go routines

Source: https://stackoverflow.com/questions/15715605/multiple-goroutines-listening-on-one-channel#15721380 Yes, it’s complicated, But there are a couple of rules of thumb that should make things feel much more straightforward. prefer using formal arguments for the channels you…

Variable captured by func literal

Source: https://stackoverflow.com/questions/40326723/go-vet-range-variable-captured-by-func-literal-when-using-go-routine-inside-of-f#40326812 it’s a common mistake for new comers in Go, and yes the var currentProcess changes for each loop, so your goroutines will use the last process in the…

Go features

Source: http://qr.ae/TUpzWs In Go a type definition is neither pointer nor value, it’s just a type. Go doesn’t have classes Go doesn’t have inheritance, it has interfaces for polymorphism and…

C# does Go, pipelines

Source: https://blog.marcgravell.com/2018/07/pipe-dreams-part-1.html decoupled and overlapped reader/writer access to a binary stream buffer management (pooling, recycling) threading awareness rich backlog control over-fill protection via back-pressure the data is more simply a…