eventlet引发的学习-python如何利用多核CPU
2016-03-06 19:18
573 查看
背景
通过前面几篇文章,已经清楚由于Python GIL的存在,python多线程无法达到并行执行的效果,从而也就无法达到充分利用多核CPU的效果。
解决方案
那有在python中有哪些方式才能充分利用多核CPU达到并行执行的效果呢?
使用[multiprocessing],(http://docs.python.org/library/multiprocessing.html)(多进程),可以使代码同时运行在多个进程中。
使用Jython解释器/运行时环境
使用IronPython解释器/运行时环境
使用subprocess
使用celery
使用mpicpy
使用Twisted
使用Ampoule
使用numpy
使用ctypes
参考
Is python capable of running on multiple coresDoes python support multiprocessor/multicore programming?
相关文章推荐
- Python动态类型的学习---引用的理解
- Python3写爬虫(四)多线程实现数据爬取
- 垃圾邮件过滤器 python简单实现
- 下载并遍历 names.txt 文件,输出长度最长的回文人名。
- install and upgrade scrapy
- Scrapy的架构介绍
- Centos6 编译安装Python
- 使用Python生成Excel格式的图片
- 让Python文件也可以当bat文件运行
- [Python]推算数独
- Python中zip()函数用法举例
- Python中map()函数浅析
- Python将excel导入到mysql中
- Python在CAM软件Genesis2000中的应用
- 使用Shiboken为C++和Qt库创建Python绑定
- FREEBASIC 编译可被python调用的dll函数示例