Unit of `bound`-parameter in `std::sync::mpsc::sync_channel`

Hey there!

Reading about std::sync::mpsc::sync_channel I couldn't find a clear answer about the unit used for the bound: usize parameter. Are we talking about bytes here?

So in the example let (sender, receiver) = sync_channel(1); does this mean that the underlying buffer stores at most 1 Byte?

Thanks in advance.

It's the number of messages.

2 Likes