Ticket #137 (closed defect: released)
python bindings do not release the GIL
| Reported by: | mhammond | Owned by: | olly |
|---|---|---|---|
| Priority: | normal | Milestone: | 1.0.0 |
| Component: | Xapian-bindings | Version: | SVN trunk |
| Severity: | normal | Keywords: | |
| Cc: | olly, richard, charlie, sidnei | Blocked By: | |
| Operating System: | All | Blocking: | #118 |
Description (last modified by richard) (diff)
Python's "global interpreter lock" (GIL) should be released each time any "system" operation is performed. Failure to do so will mean that other Python threads are not able to run while the operation takes place. This is particularly a problem when using a remote database, but should be done for all calls into xapian which may cause IO of any kind.
The easiest place to enable this is in the %exception definition, although it means the GIL is released for *all* calls into xapian - which should be fine. I'm attaching a patch.
