to solve such issue, i guess a template could, meeting a missing thumbnail, add the filename to a batch file, and output a placeholder to the browser.
at the end of the template generation, run the batch file as a background process (not stopping hfs).
this lead us to another problem: 2 visitors may issue twice the thumbnail making.
it can be solved by creating a "locking" temp file, by creating a file named "thumbs\"+filename+".lock", that will be deleted by the batch file after the generation.