Handel cancellation on background thread.