Cannot sort PyCapsule during multiprocessing.

I wrote a c library for python as an .so object that I am importing. Internally, I use PyCapsules to manage C structures or use C functions, and it works well. I want to parrallelize the use of a function in my .so lib using multiprocessing.Pool. It seems that multiprocessing.Pool cannot open PyCapsules:

cPickle.PicklingError: Can't pickle <type 'PyCapsule'>: attribute lookup __builtin__.PyCapsule failed

Does anyone have any ideas, is there a workaround? Thank.

+4
source share

Source: https://habr.com/ru/post/1546109/


All Articles