Decouple HostBuffers from Stream
To allow asynchronous monitoring and output writing, the HostBuffers must be decoupled from Stream and handled separately.
-
A HostBuffersManager
should be created that will allocate a configurable number ofHostBuffers
. -
StreamWrapper
andStream
should be adapted to be passed anHostBuffersManager const*
on construction, from which they will request aHostBuffers*
by index. The index will be passed in from the main loop. -
The main keeps track of what HostBuffers
instances are free and hands them out together with slice indices whenever a slice is sent for processing
Edited by Daniel Charles Craik