Ticket #364 (reopened defect)
Use the "full" Python thread API
| Reported by: | olly | Owned by: | olly |
|---|---|---|---|
| Priority: | normal | Milestone: | 1.2.x |
| Component: | Xapian-bindings (Python) | Version: | SVN trunk |
| Severity: | normal | Keywords: | |
| Cc: | dnsauve@…, alex@… | Blocked By: | |
| Operating System: | All | Blocking: |
Description
This bug is essentially "son of #185".
Most of the issues in that ticket are fixed, but the requirement to run Xapian-using code in the main interpreter when using mod_python or mod_wsgi remains.
Mark Hammond gives a good summary of what needs doing for this in comment:ticket:185:3 - essentially we would need to use the full Python thread API and keep a reference to "our" Python interpreter in thread local storage.
I think doing this won't require modifications to SWIG (though perhaps we should ultimately offer a patch to SWIG to provide this as an option) - you can override what SWIG uses in the blocking/allowing thread begin/end boilerplate, so I think someone "just" needs to write suitable replacements which store the interpreter in thread local storage which we can plug in to our interface files.
