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 authored and alanking committed Aug 22, 2024
1 parent b4acaef commit bcf1d13
Showing 1 changed file with 333 additions and 257 deletions.
Loading

0 comments on commit bcf1d13

Please sign in to comment.