Cancel Download

If you need to stop a bulk download early, you can use the cancel() method to safely exit. This will also remove the active recovery link. Any progress streams will stop emitting events, and no more tiles will be downloaded. If buffering is in use, the buffer will be written.
This will cause multiple QueueCancelledExceptions to be emitted, one for every tile remaining.
These are safe to ignore, and cannot be easily caught.
This is automatically called at the end of a download to avoid memory leaks and force a buffer write.
© Luka Stillingfleet (JaffaKetchup) | 2023