Parallelism in Python

后端 未结 5 1005
星月不相逢
星月不相逢 2021-01-07 17:19

What are the options for achieving parallelism in Python? I want to perform a bunch of CPU bound calculations over some very large rasters, and would like to parallelise th

5条回答
  •  天命终不由人
    2021-01-07 18:02

    The new (2.6) multiprocessing module is the way to go. It uses subprocesses, which gets around the GIL problem. It also abstracts away some of the local/remote issues, so the choice of running your code locally or spread out over a cluster can be made later. The documentation I've linked above is a fair bit to chew on, but should provide a good basis to get started.

提交回复
热议问题