Practical usefulness of removed "can_send_message" after release 0.0.12 #98
-
You decided to remove that functionality. But it seems to have at least one useful purpose. Let's consider the case of sending a large file (about 1-2 GB) in ReliableOrdered channel. The sender could open the file for reading, and iteratively read the contents of the file in small chunks, say 256 KB. Right now the only way to avoid this error in cases like this, is to increase |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Yeah, it makes sense. I can add back it back, and the check is simple like you said: |
Beta Was this translation helpful? Give feedback.
Yeah, it makes sense.
I can see the usefulness. For example, if you have a channel only for big files (ex: content download), then checking if it is possible to send the next file would be ideal instead of sending all of them. Or do some kind of streaming as you described.
I can add back it back, and the check is simple like you said:
channel.max_memory_usage_bytes <= message_size + channel.memory_usage_bytes
.