Added a mechanism to perform a block when one or more operations have completed.