Support cancellation through progress monitor.

Change-Id: I67ebaf1b1ef8906c40f36ba44290f2b44137e5be