Avoid doing work in a pipe