You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This might be a bit much to ask for, but it would be very useful on embedded systems if it was possible to statically allocate the backing storage for the inner Chan of bounded channels.
We have some pretty large channels and leaving them to be dynamically allocated seems to lead to a lot of memory fragmentation with the inner VecDeques being reallocated when they need to grow, which would be alleviated by having the storage for these bounded channels statically allocated at compile-time.
Alternatively just having a way to pre-allocate the VecDeques to the max capacity would be helpful as well, albeit not optimal.
The text was updated successfully, but these errors were encountered:
I definitely like this idea! I'm not sure I have time to implement it at the current time, but I think the way I'd go about this would be to give Sender and Receiver a default parameter implementing a Container trait and then go from there (with a way to pass a container / reference to a container to the channel function.
This might be a bit much to ask for, but it would be very useful on embedded systems if it was possible to statically allocate the backing storage for the inner
Chan
of bounded channels.We have some pretty large channels and leaving them to be dynamically allocated seems to lead to a lot of memory fragmentation with the inner
VecDeque
s being reallocated when they need to grow, which would be alleviated by having the storage for these bounded channels statically allocated at compile-time.Alternatively just having a way to pre-allocate the
VecDeque
s to the max capacity would be helpful as well, albeit not optimal.The text was updated successfully, but these errors were encountered: