Skip to content

THPPlugin calls Python API without GIL #146

@colesbury

Description

@colesbury

THPPlugin calls into the Python API without holding the GIL. Most of the calls look benign (read-only access), but it probably should be cleaned up:

...
        Py_UNBLOCK_THREADS;
        THTensor_(set)(LIBRARY_STATE ((THPTensor*)self)->cdata, ((THPTensor*)PyTuple_GET_ITEM(args, 0))->cdata);
        Py_BLOCK_THREADS;
...

Metadata

Metadata

Assignees

No one assigned

    Labels

    todoNot as important as medium or high priority tasks, but we will work on these.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions