top | item 45695608

(no title)

tczMUFlmoNk | 4 months ago

Sure. If T is a zero sized type, then chan T should just be an atomic int.

I am not sure how much this improves code readability in practice—I see chan struct{} frequently, but I cannot recall ever having seen chan T for a zero-sized T other than struct{}.

discuss

order

No comments yet.