If you try to display the index page in repoze.profile, while your app is
hammered by a lot of calls, you will get EOFErrors because the profile data it's
trying to display is being built.
the index() call in __call__ should be protected by the lock to avoid this:
text = self.index(environ)