3 ms·
How about channel channels? https://github.com/twpayne/go-pubsub/blob/master/pubsub.go#L17 https://github.com/twpayne/go-pubsub/blob/master/pubsub.go#L...
by jessekv 1y ago
How about channel channels?
https://github.com/twpayne/go-pubsub/blob/master/pubsub.go#L17 https://github.com/twpayne/go-pubsub/blob/master/pubsub.go#L...
- sapiogram 1y agoYou joke, but this is not uncommon at all among channels purists, and is the inevitable result when they try to create any kind of concurrency abstractions using channels. Ugh... I hope I never have to work with channels again.
- __s 1y agoI'm guilty of this too https://github.com/PeerDB-io/peerdb/blob/d36da8bb2f4f6c1c821b17ddf7b5217be5b6c331/flow/connectors/utils/lua.go#L105 https://github.com/PeerDB-io/peerdb/blob/d36da8bb2f4f6c1c821... The inner channel is a poor man's future. Came up with this to have lua runtimes be able to process in parallel while maintaining ordering (A B C in, results of A B C out)
- lanstin 1y agoI have a channel for my gRPC calls to send work to the static and lock free workers; I have a channel of channels to reuse the same channels as allocating 40k channels per second was a bit of CPU. Some days I am very pleased with this fix and some days I am ashamed of it.