A scoped global interpreter (GIL) lock.
The GIL only allows one thread at a time to run in the python interpreter. Python normally releases the GIL at regular intervals, to give other threads a chance to run. If a C++ method is called from python (you are in C++), it is your job to release the GIL. If you go crunch numbers for 2 hours while holding the GIL, you will freeze the whole interpreter. You can release the GIL by creating an instance of ScopedGILThreadLock. It will automatically acquire the GIL back when it goes out of scope.