文件操作 - sleepthreadasync.py
返回文件管理
返回主菜单
删除本文件
文件: /usr/share/doc/uwsgi-core/tests/sleepthreadasync.py
编辑文件内容
import uwsgi import threading import time def foo(): while True: time.sleep(1) print("ciao, sono un thread") t = threading.Thread(target=foo) t.daemon=True t.start() def application(e, s): s('200 OK', [('Content-Type','text/html')]) for i in range(0,3): yield uwsgi.async_sleep(1) yield "iter: %d<br/>" % i
修改文件时间
将文件时间修改为当前时间的前一年
删除文件