'Fill in all the cache information. This method is threadsafe, in the
sense that every caller will see the same state upon return, and if the
cache is already initialised, it does no work.'

def _populate(self):

    if self.loaded:
        return
    self.write_lock.acquire()
    try:
        if self.loaded:
            return
        for app_name in settings.INSTALLED_APPS:
            if (app_name in self.handled):
                continue
            self.load_app(app_name, True)
        if (not self.nesting_level):
            for app_name in self.postponed:
                self.load_app(app_name)
            self.loaded = True
    finally:
        self.write_lock.release()
