简体   繁体   中英

is there any Alternative for sleep() function for increasing performance in python?

有一个连续运行的程序,它将检查是否有文件进入特定目录,或者是否有新文件进入,是否会将该文件放入我使用过的sleep()函数的数据库中,但会降低性能(考虑该程序在服务器端运行),所以我需要其他选择吗?

如果您使用的是Linux,则pyinotify是一个不错的库。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM