primitive implementation of a stream channel with consistent states