Skip to content

Commit

Permalink
[218] Proper python multithreading
Browse files Browse the repository at this point in the history
With Python 3.12, we started seeing crashes during certain multithreaded
operations. It turns out that changes to the GIL in 3.12 exposed that we are
not handling Python thread state properly. This commit fixes this.

A new namespace python_state has been added to main.cpp for holding onto some
Python state information, and a new struct python_thread_state_scope has also
been added for managing Python thread state.

This will be improved upon in the future.
  • Loading branch information
SwooshyCueb committed Aug 21, 2024
1 parent cbd483d commit 33e7ab6
Showing 1 changed file with 333 additions and 257 deletions.
Loading

0 comments on commit 33e7ab6

Please sign in to comment.