On Thu, Apr 29, 2021 at 11:24 AM Øyvind Teig <oyvind.t...@teigfam.net> wrote:

> This is not solved with a default clause, which transforms the selective 
> choice waiting for some event to happen into busy polling. It's nice yo have 
> some times, but that is something orthogonal to pri/ordered.

Not sure if I would call it busy polling, but I meant schematically this:

        select {
        case x := <-highPriority:
                handle(x)
        default:
                select {
                case x := <-highPriority:
                        handle(x)
                case x := <-lowPriority:
                        handle(x)
                }
        }

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/CAA40n-XD0WkK7ba8ZEsSTEwOhGTL7qNuNnXwyi5VgD-e69OCuw%40mail.gmail.com.

Reply via email to