def __call__(self, environ, start_response):
with self.mapper_lock:<EOL><INDENT>self.recheck_limits()<EOL>mapper = self.mapper<EOL>for preproc in self.preprocessors:<EOL><INDENT>preproc(self, environ)<EOL><DEDENT><DEDENT>environ['<STR_LIT>'] = self.conf<EOL>if mapper:<EOL><INDENT>mapper.routematch(environ=environ)<EOL><DEDENT>if '<STR_LIT>' in environ and environ['<STR_LIT>']:<EOL><INDENT>delay, limit, bucket = sorted(environ['<STR_LIT>'],<EOL>key=lambda x: x[<NUM_LIT:0>])[-<NUM_LIT:1>]<EOL>return self.formatter(delay, limit, bucket,<EOL>environ, start_response)<EOL><DEDENT>with self.mapper_lock:<EOL><INDENT>for postproc in self.postprocessors:<EOL><INDENT>postproc(self, environ)<EOL><DEDENT><DEDENT>return self.app(environ, start_response)<EOL>
Implements the processing of the turnstile middleware.  Walks
the list of limit filters, invoking their filters, then
returns an appropriate response for the limit filter returning
the longest delay.  If no limit filter indicates that a delay
is needed, the request is passed on to the application.