is python capable of running on multiple cores?

前端 未结 7 958
悲&欢浪女
悲&欢浪女 2020-11-28 03:58

Question: Because of python\'s use of \"GIL\" is python capable running its separate threads simultaneously?


Info:

After reading this I came away rathe

相关标签:
7条回答
  • 2020-11-28 04:34

    Threads share a process and a process runs on a core, but you can use python's multiprocessing module to call your functions in separate processes and use other cores, or you can use the subprocess module, which can run your code and non-python code too.

    0 讨论(0)
提交回复
热议问题