In some more curious situations, it may be desirable to run some threads in the backend for managing multiple I/O jobs.
Current gating aspects:
- Threads cannot have access to the database (should be easy with existing protections)
- Parts of pg-python rely on global state, Py_ALLOCATE_OWNER()
- Thread finalization on_proc_exit?
- Other lower level problems/threads in the backend are frickin' scary?
Another option is to just use event driven async systems.
In some more curious situations, it may be desirable to run some threads in the backend for managing multiple I/O jobs.
Current gating aspects:
Another option is to just use event driven async systems.