Ticket #364 (reopened defect)

Opened 15 months ago

Last modified 3 weeks ago

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.

Change History

Changed 14 months ago by notanumber

  • cc dnsauve@… added

Changed 3 months ago by olly

  • status changed from closed to reopened
  • resolution fixed deleted

Fixing status - was closed by spammer.

Changed 3 months ago by sk1p

  • cc alex@… added

Changed 6 weeks ago by olly

  • component changed from Xapian-bindings to Xapian-bindings (Python)

Changed 3 weeks ago by olly

  • version changed from 1.1.0 to SVN trunk
  • milestone set to 1.2.x

This should cause any incompatibilities for existing code using the Python bindings, so marking as suitable for 1.2.x.

Note: See TracTickets for help on using tickets.