-
Notifications
You must be signed in to change notification settings - Fork 78
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Extending stream method inventory #17
Comments
Per the latest evolution/iteration, considering to implement:
|
So, the top-level decision point appears to be:
The current direction of thought follows choice 2, with BytesIO being such an object. But fairly speaking, the fact that current streams in uPy are unbuffered is not ideal (won't compare favorably with benchmarks of buffered streams in other systems), so we may end up adding buffering directly to streams, and thus might rely on this buffering for some operations. But this buffering would be available only for some operations, e.g. read(), but not socket.recv(), the latter is not supposed to be buffered. But using data from recv() for buffering/stream access is still oftentimes useful, so the approach of having an external generic buffer still comes as beneficial. (Then the next question will be how to avoid code, etc., duplication when implementing buffering for standard, e.g. file, streams - and that requires separate consideration and answers. Reusing BytesIO underlyingly can be one of the answers, unless there's a clear benefit to implement a more lightweight variant.) |
Instead of that 2., and following 3., now considering to do:
|
This is a continuation of:
The text was updated successfully, but these errors were encountered: