Global Interpreter Lock review

Open
#52 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Refactor
Clarity
Needs clarification
Activity status
Stale
Tech stack
cpp, python
Domain
api, cryptography

Research direction

Review the pybind11 GIL documentation linked in the issue, then inspect the project's Python bindings to determine which operations are safe without the lock. The work is done when the safe bindings are identified and use py::call_guardpybind11::gil_scoped_release() where appropriate.

Written by the indexing model from the issue text.

Description

Good first issue :mortar_board: Type: New Feature :heavy_plus_sign:

Right now, for all the bindings, we always hold the Global Interpreter Lock(GIL)
https://pybind11.readthedocs.io/en/stable/advanced/misc.html#gil

This prevents our code from being run from multiple Python threads.
We should investigate which bindings are working safe without the lock, adding py::call_guardpybind11::gil_scoped_release() to them.

Dominant language
C++
Stars
1k
Forks
175
Avg merge
6d 12h
Merged PRs (30d)
5

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from OpenMined/TenSEAL

All issues in OpenMined/TenSEAL

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.