Skip to content

cainiaopython/python_tips

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 

Repository files navigation

python_tips

some tips in learning python

Python常见的并发过程有进程,线程,协程!为了更好的对比这几种并发的优劣,我写了一个小的爬虫程序来对比测试: 由于爬虫是IO密集型的业务,可以用多线程来有效的提速,而多线程又有两种方法,一种是通过系统默认的线程池直接构建,另外一种是通过手动建线程池,然后加到queue里面,进行处理!

当然这个例子只是demo,如果需要严格的测试运行时间,最好用timeit来测

About

some tips in learning python

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages