Port of AsyncUtils to Ruby for fun :)