3 ms·
That is only one way of doing things. Even though channels facilitate that method, it is not unidiomatic to not use them. Channels are a way of queueing work,
by jamra 13y ago
That is only one way of doing things. Even though channels facilitate that method, it is not unidiomatic to not use them.
Channels are a way of queueing work, which is great for many use cases.
You can use mutexes and shared memory if your situation calls for it. For example, if I am doing a graph traversal concurrently, I can use channels to send the work to many listening threads as I traverse that graph synchronously.
If for some reason, I need to update that graph's representation asynchronously, I may need to use mutexes to lock the graph since the graph is now shared memory.