hdlConvertor icon indicating copy to clipboard operation
hdlConvertor copied to clipboard

release GIL during parsing

Open Nic30 opened this issue 6 years ago • 2 comments

Currently the Global Interpreter Lock is held even if only C++ code is parsing. Releasing GIL during this time will make multithreading as fast as multiprocessing without need for inter process communication.

Nic30 avatar Aug 11 '19 15:08 Nic30

https://github.com/Nic30/hdlConvertor/blob/2d3458d0881483a0be7ff9a2b9628398ff211ee6/hdlConvertor/_hdlConvertor.pyx#L42

To be replace by cdef cppclass Convertor nogil:

Should do the job. (Not tested)

Thomasb81 avatar Aug 11 '19 22:08 Thomasb81

It may not be so easy as the python AST object are build in c++, but we may just need to wrap this method in GIL.

Nic30 avatar Aug 11 '19 22:08 Nic30