On Mon, 3 Sep 2018 06:22:27 +
Anik Hasibul wrote:
> Can you please provide an example? I am new to golang.
>
Create N client receivers with channel and save the list of client
channel as list,
for x := 0; x < 5; x++ {
cl := make(chan int, 1)
chanClients
Can you please provide an example? I am new to golang.
From: Mhd Shulhan
Sent: Monday, September 3, 2018 12:17:57 PM
To: anik3...@gmail.com
Cc: golang-nuts
Subject: Re: [go-nuts] Listen by multiple goroutines via channels
On Mon, 3 Sep 2018, 13:03
On Mon, 3 Sep 2018, 13:03 , wrote:
> I have a postgresql notification listener.
>
> And i have thousands of different goroutines.
>
> I am waiting to receive a single notification from each goroutine.
>
>
> But only one channel is getting the value. Example:
>
I have a postgresql notification listener.
And i have thousands of different goroutines.
I am waiting to receive a single notification from each goroutine.
But only one channel is getting the value. Example:
https://play.golang.org/p/1a4cVLad8db
But I am expecting, all user `Receiver()`