python: Rewrote ashd.async for greater generality.