re_path(r'ceshi_uwsgi',view=views.test),
re_path(r'ceshi_uwsgi2',view=views.test),
def test(request):
time.sleep(5)
return HttpResponse('ok')
def test2(request):
time.sleep(5)
return HttpResponse('ok')
启动方式
python manage.py runserver 0:8002
例 1:当我快速在浏览器两个窗口分别输入
http://localhost:8002/publisher/ceshi_uwsgi
http://localhost:8002/publisher/ceshi_uwsgi
给我的反应是一个窗口请求 5 秒执行完后再执行另外一个窗口请求,总共 10 秒
例 2:当我快速在浏览器两个窗口分别输入
http://localhost:8002/publisher/ceshi_uwsgi
http://127.0.0.1:8002/publisher/ceshi_uwsgi
给我的反应是基本上是同时执行 请求总共 5 秒中