Nice you’ve found the problematic part!
I think you are basically right. The use case would be a bit more complicated if you use more workers.
Also how are you going to stop the DataLoader? Do you want to stop it with CTRL+C?
If so, you have to take care of stopping all workers, since I’ve seen quite often zombie python processes from stopped DataLoaders.
I’m not sure, if this will yield to a clean solution.