Polling a queue is usually not required (you can devote another thread on the Python side to blocking .get calls on it), but this is not very important. The problem is that with such an agreement you can get to the GIL - see the Three links from this page on Wikipedia, where you can find many ways.
When you connect to / from C using C (or Cython ) code using the Python C API, you can free and acquire GIL quite simply, at least hopefully by avoiding deadlocks and the like; with ctypes, GIL operations are automated when you call back to / from C situations, so if there is any other lock in the game, a deadlock is a risk (since things are not under your control, you cannot easily provide Djikstra with the Banker algorithm applied ).
source share