Re: [go-nuts] Are receivers from a channel fifo?
Try it out :) seems like a simple enough test program to write. -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [go-nuts] Are receivers from a channel fifo?
On 21/08/2016 21:51, Jan Mercl wrote: On Sun, Aug 21, 2016, 22:43 Steven Hartland> wrote: If I have multiple goroutines reading from a channel are they guaranteed to be FIFO i.e. is the handler that requested the read first guaranteed to get the first value, second to get the second and so on? Values read from a channel will always be in the FIFO order, but that is not related to concurrent channel reads as those are, per se, not ordered in any way. So can this result in one routine never getting any reads if there's a constant flow of incoming readers? Regards Steve -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [go-nuts] Are receivers from a channel fifo?
On Sun, Aug 21, 2016, 22:43 Steven Hartlandwrote: > If I have multiple goroutines reading from a channel are they guaranteed > to be FIFO i.e. is the handler that requested the read first guaranteed to > get the first value, second to get the second and so on? > > Values read from a channel will always be in the FIFO order, but that is not related to concurrent channel reads as those are, per se, not ordered in any way. -- -j -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[go-nuts] Are receivers from a channel fifo?
No. See what a select statement says about order when multiple cases are choosable: not defined, and the implementation guarantees uniform randomness -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[go-nuts] Are receivers from a channel fifo?
If I have multiple goroutines reading from a channel are they guaranteed to be FIFO i.e. is the handler that requested the read first guaranteed to get the first value, second to get the second and so on? Regards Steve -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.