ITK icon indicating copy to clipboard operation
ITK copied to clipboard

Release the GIL in ITK operations

Open mrocklin opened this issue 4 years ago • 7 comments

First, a question: Does the ITK Python library release the GIL when it calls down to lower level C/C++ code?

When I run ITK operations within Dask I notice that my servers lock up. The most common cause of this is that some low level code is holding onto the GIL and not letting go. Is it possible that ITK does this?

If ITK does not release the GIL, could it?

xref https://discourse.itk.org/t/parallelize-itk-imageseriesreader-itk-4-12/1745/15

mrocklin avatar Aug 02 '19 01:08 mrocklin

@mrocklin thanks for the report. We will dive deeper into this.

:xref: #1065 , which was not sufficient.

thewtex avatar Aug 09 '19 14:08 thewtex

This is how it is done in SimpleITK: https://github.com/SimpleITK/SimpleITK/commit/e9ce7283a7614a92711e1bd2c65866740e4d8a00

blowekamp avatar Aug 09 '19 14:08 blowekamp

This issue has been automatically marked as stale because it has not had recent activity. Thank you for your contributions.

stale[bot] avatar Dec 06 '20 05:12 stale[bot]

This issue has been automatically marked as stale because it has not had recent activity. Thank you for your contributions.

stale[bot] avatar Jun 11 '21 01:06 stale[bot]

I'd love to keep this alive if we could

On Thu, Jun 10, 2021 at 8:24 PM stale[bot] @.***> wrote:

This issue has been automatically marked as stale because it has not had recent activity. Thank you for your contributions.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/InsightSoftwareConsortium/ITK/issues/1134#issuecomment-859192738, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACKZTE6PGTRXIY2MXTZTOTTSFQU3ANCNFSM4IIZVHIQ .

mrocklin avatar Jun 11 '21 02:06 mrocklin

I am wondering if the observed behavior was related to:

https://github.com/InsightSoftwareConsortium/ITK/commit/cfdb5023a82fc61f3825231b257ca47f4d9d4d8a

or

https://github.com/InsightSoftwareConsortium/ITK/issues/2069

thewtex avatar Jun 17 '21 03:06 thewtex

This issue has been automatically marked as stale because it has not had recent activity. Thank you for your contributions.

stale[bot] avatar Apr 16 '22 11:04 stale[bot]