fn read_input( input: &mut InStreamType, thread_in_avail_evt: &Event, buffer: Arc<Mutex<VecDeque<u8>>>, kill_evt: Event, ) -> Result<()>