call this to ensure the background thread is stopped . this only needs to be called in the case that iterator was not exhausted meaning next was not called on the iterator until null was returned . after calling this method it is still possible to iterate the remaining items that had been read in the background using next . concode_field_sep ConditionVariable waitingForReader concode_elem_sep String bucketName concode_elem_sep String s3ContentPrefix concode_elem_sep int QUEUED_ITEMS_FULL_THRESHOLD_VALUE concode_elem_sep int QUEUED_ITEMS_HYSTERISIS_VALUE concode_elem_sep String prefix concode_elem_sep boolean includeDirectories concode_elem_sep Thread listingThread concode_elem_sep String LOG_TAG concode_elem_sep String delimiter concode_elem_sep AmazonS3 s3Client concode_elem_sep boolean areListingObjects concode_elem_sep S3ListErrorHandler errorHandler concode_elem_sep ConditionVariable waitingForObjects concode_elem_sep AtomicInteger summaryCount concode_elem_sep int MAX_KEYS_PER_REQUEST concode_elem_sep ConcurrentLinkedQueue<S3ContentSummary> summaries concode_field_sep S3ContentSummary next concode_elem_sep String getRelativeS3Path concode_elem_sep Iterator<S3ContentSummary> iterator concode_elem_sep void onError concode_elem_sep boolean willNextBlock concode_elem_sep boolean isThrowableDueToInterrupt concode_elem_sep void run concode_elem_sep boolean hasNext concode_elem_sep S3ContentSummary getNext concode_elem_sep void remove
void function ( ) { if ( ! areListingObjects ) { return ; } areListingObjects = false ; waitingForReader . open ( ) ; listingThread . interrupt ( ) ; }