News for hackers. Stuff that matters.
Re:Ergo: Erlang-inspired event driven actor framework in Go by kbolino on Thursday September 12, 2024 @01:04PM (#41523022)
The ordinary send operation blocks if the channel is full (or has no buffer), but you can send (or receive) without ever blocking, if you can accept that the message is dropped instead. It's not the most ergonomic operation, though:

    var sent bool
    select {
        case channel<-message:
            sent = true
        default:
            sent = false
    }

There are no comments on this comment yet.