Change autoupdate monitoring so that it does not block a thread while waiting

Add graceful cancellation to autoupdatemonitoring