Add a mechanism for blocking on promises.