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
Now that we accept any write, if we do something like pair(foo, bar) and hit e.g WouldBlock after writing foo, we are in a state where we already wrote foo, but not yet bar, and reusing the same combinator would write foo a second time.
The text was updated successfully, but these errors were encountered:
Sounds like a job for generators, it would otherwise be relatively difficult (or a lot of effort) to manually add resumption points into the the serializers.
This is similar to nom requiring to parse everything again if not enough data was available (though not as bad there as here), which could be optimized with generators.
my usual approach to async IO is to have buffers between the serializer and the socket, so it's not a very big issue. But it would be nice to have a combinator that can manage some state. I had something like this with the previous design idea based on futures
Now that we accept any write, if we do something like pair(foo, bar) and hit e.g WouldBlock after writing foo, we are in a state where we already wrote foo, but not yet bar, and reusing the same combinator would write foo a second time.
The text was updated successfully, but these errors were encountered: