Skip to content
Discussion options

You must be logged in to vote

My approach to get this working with the current code has been to wrap source_stream in an Arc<Mutex> so that I can clone it and therefore create a new ByteLimitedStream for each write I need to do. It doesn't feel very pretty because this code is not parallel but it seems like my only alternative to that was using an UnsafeCell and implementing Send

Replies: 1 comment 2 replies

Comment options

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

asubiotto Sep 5, 2025
Collaborator Author

@asubiotto
Comment options

asubiotto Sep 8, 2025
Collaborator Author

Answer selected by asubiotto
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