On 04/29/2010 11:41 AM, Chris Withers wrote:
> Chris McDonough wrote:
>> You could do:
>> def app(global_config, **settings):
>> config = Configurator(settings=settings)
>> config.registry.provideUtility(factory(), ISomething)
>> return config.make_wsgi_app()
>>> ...or do I have to do something to make sure I register in the right
>> During the configuration stage, the "current" global registry is
>> defined as whatever registry is attached to the configurator between
>> the begin() and end() calls.
> <clueless alert>
> In a wsgi app, is the app function above executed once per process or
> once per thread?
Once per process.
>> Preferably, don't do that at all, and you'll wind up putting
>> registrations into the Zope global registry, which your app can use
> ...right, but if I do that configuration inside app(), and it gets
> executed once per thread, won't I be re-doing the global registrations
> unnecessarilly? (I don't know if that has bad consequences...)
Repoze-dev mailing list