Reland "Promise.race() based select like pipeTo implementation"