Fix race condition when generating thumbnails
Currently it's possible to run into a race condition when generating thumbnails causing some thumbnails to not get generated. This race condition should be fixed.
Currently it's possible to run into a race condition when generating thumbnails causing some thumbnails to not get generated. This race condition should be fixed.