Mutexing registry of compiled templates