Feature/pipe pending handles 2

Github isn't updating previous PR because it was closed.

/cc @jclulow @bnoordhuis @saghul