Because there are no atomic operations for smaller integers, I assume :)
On Sat, Mar 27, 2021 at 4:18 PM Paul Zhang <[email protected]> wrote:
> For the channel structure:
>
> type hchan struct {
> qcount uint
> dataqsiz uint
> buf unsafe.Pointer
> elemsize uint16
> closed uint32
> elemtype *_type
> sendx uint
> recvx uint
> recvq waitq
> sendq waitq
>
> lock mutex
> }
>
> Why does the closed need a uint32? I am reading the code and found that it
> seems to be only 0 or 1.
>
> --
> 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 [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/golang-nuts/be0dcd41-2819-4636-8ab6-125d0e9ee07bn%40googlegroups.com
> <https://groups.google.com/d/msgid/golang-nuts/be0dcd41-2819-4636-8ab6-125d0e9ee07bn%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
--
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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/golang-nuts/CAEkBMfHv6rcpi22f%2BrrP94TvBWvzj60TV-P0SQyLm5P0Yd3YHQ%40mail.gmail.com.