Miles Posted on Apr 29 python异步请求:一开始写的代码是直接加了async,结果两个函数的请求仍是同步的,单个请求耗时0.3s,两个耗时0.7s。后经调研,发现,需要使用aiohttp请求,才可以实现真正的异步。优化后,总耗时0.4-0.5s左右。 Top comments (0) Subscribe Personal Trusted User Create template Templates let you quickly answer FAQs or store snippets for re-use. Submit Preview Dismiss Code of Conduct • Report abuse Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink. Hide child comments as well Confirm For further actions, you may consider blocking this person and/or reporting abuse
Top comments (0)