python - “async with lock“和 “with await lock“有什么区别?

自python 3.7起不推荐使用第二种形式with await lock,并且在python 3.9中已将其删除。
使用Python 3.7运行它会发出以下警告:

DeprecationWarning: 'with await lock' is deprecated use 'async with lock' instead

 

 

 

猜你喜欢

转载自blog.csdn.net/m0_54219225/article/details/121508225