Skip to content

Practical usefulness of removed "can_send_message" after release 0.0.12 #98

Answered by lucaspoffo
juzpermsky asked this question in Q&A
Discussion options

You must be logged in to vote

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.

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@juzpermsky
Comment options

@lucaspoffo
Comment options

Answer selected by juzpermsky
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants