2 Jul
2014
2 Jul
'14
1:43 p.m.
2014-07-02 15:20 GMT+02:00 Niall Douglas
How would that help him with the blocking from the i/o?
non-blocking IO (maybe with boost.asio)
The coroutines need to fire every time a chunk comes in from the i/o source, but what is a chunk?
it depends on the algorithm - if the chunk of bytes contains a complete set of data it can be pushed along the pipeline - otherwise the chunk can be stored in a local variable
Each processor will define a chunk differently, and that means each section of the pipeline needs to carry state.
the state could be stored in a local variable for instance a local buffer is filled by an IO-op until enough bytes are arrived and the message can be parsed from the buffer