Merged tagset-133281 from repository ktf
Adapt to the new multithreaded API which requires a StreamID to be passed.