pub fn measure_and_send<T>( chan: &Sender<T>, obj: T, pb: &ProgressBar, ) -> Result<(), SendError<T>>
Send to a channel while updating the length.