Since file locking was introduced, it's sufficient to rename the file. When all the write locks go away, the read lock will work; meanwhile the threads attempting to write will simply create and start locking the new file. Thus, template filename creation isn't really needed.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Since file locking was introduced, it's sufficient to rename the file. When all the write locks go away, the read lock will work; meanwhile the threads attempting to write will simply create and start locking the new file. Thus, template filename creation isn't really needed.