> > What about removing connection x like this: > > if (x < active) { > std::swap (pipes [x], pipes [A-1]); > x = A = A - 1; > } > std::swap (pipes [x], pipes [pipes.size () - 1]); > pipes.resize (pipes.size () - 1); > This'll work, but can we guarantee fairness? I'll update the patch and will post it during weekend. Dhammika