This is a port of or asyncexec from https://code.google.com/p/ci-factory/