yes your understanding of the question is correct.

Since the batch creation in your code snippet is really simple, the background worker is able to fetch 3 batches before the  DataLoader  loop returns the first  data  batch.

acually I found this problem is because I have a dataloader with data augmentation and I want to check which image got loaded, then I try to print out the index. Thus I am not sure this is because the dataloader is simple, thus it can fetch 3 items and print out.
so what I worry is, if the batch size is large, say 128, when we load a batch, will it become slower just because we keep generating the index? because I created a notebook to test this and it seems when batch size is large, the index will get printed so many times.
but I just dont know if this kind of “slow” is because we have large batch, or becuase the loader generate index many times thus introduce some extra loading time.
Thanks for your reply.