I'm aware of the discussion in the open PR #6, this ticket is here to have the discussion without referring to a specific implementation.
One thing you mention is that using coroutines is not a preferred solution, could you elaborate on why not?
Coroutines have low overhead (similar to function calls), and are easy to implement.
I have created a proof of concept PR for LibSerialize that shows how it can be done transparently for the calling code. (rossnichols/LibSerialize#7)
The idea is that the library yields at given byte intervals when it detects it is running inside a coroutine.
I'm aware of the discussion in the open PR #6, this ticket is here to have the discussion without referring to a specific implementation.
One thing you mention is that using coroutines is not a preferred solution, could you elaborate on why not?
Coroutines have low overhead (similar to function calls), and are easy to implement.
I have created a proof of concept PR for LibSerialize that shows how it can be done transparently for the calling code. (rossnichols/LibSerialize#7)
The idea is that the library yields at given byte intervals when it detects it is running inside a coroutine.