Cancel the request and wait until it actually is cancelled when exiting the sample. This is a bit ugly, especially the busy-waiting part, but still better than potentially crashing.
Cancel the request and wait until it actually is cancelled when exiting the sample. This is a bit ugly, especially the busy-waiting part, but still better than potentially crashing.