Tests: added Python threading tests.

This commit is contained in:
Max Romanov
2020-11-05 00:05:02 +03:00
parent 8e37b1cbf5
commit f27953af61
4 changed files with 124 additions and 0 deletions

View File

@@ -0,0 +1,15 @@
import time
import threading
def application(environ, start_response):
delay = float(environ.get('HTTP_X_DELAY', 0))
time.sleep(delay)
start_response('200', [
('Content-Length', '0'),
('Wsgi-Multithread', str(environ['wsgi.multithread'])),
('X-Thread', str(threading.currentThread().ident))
])
return []