diff options
| author | scoder <none@none> | 2009-02-17 22:23:31 +0100 |
|---|---|---|
| committer | scoder <none@none> | 2009-02-17 22:23:31 +0100 |
| commit | 3d0a630fc6af5075563ddb0d3d4dc57e6985210f (patch) | |
| tree | 2f4227be3cec1795f8bd9581398bba6f3d45ed82 /doc/FAQ.txt | |
| parent | 8ef13c9f39f97282020a05354c71d654e800d9f6 (diff) | |
| download | python-lxml-3d0a630fc6af5075563ddb0d3d4dc57e6985210f.tar.gz | |
[svn r4099] r5021@delle: sbehnel | 2009-02-17 22:21:06 +0100
FAQ note on threading: use 2.2+
--HG--
branch : trunk
Diffstat (limited to 'doc/FAQ.txt')
| -rw-r--r-- | doc/FAQ.txt | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/doc/FAQ.txt b/doc/FAQ.txt index 2527400e..88dbb7ba 100644 --- a/doc/FAQ.txt +++ b/doc/FAQ.txt @@ -612,7 +612,7 @@ Threading Can I use threads to concurrently access the lxml API? ------------------------------------------------------ -Short answer: yes, if you use lxml 2.1 and later. +Short answer: yes, if you use lxml 2.2 and later. Since version 1.1, lxml frees the GIL (Python's global interpreter lock) internally when parsing from disk and memory, as long as you use @@ -634,14 +634,14 @@ most efficient if it was parsed in the same thread that executes it. One way to achieve this is by caching stylesheets in thread-local storage. -Warning: Before lxml 2.1, there were issues when moving subtrees -between different threads. If you need code to run with older -versions, you should generally avoid modifying trees in other threads -than the one it was generated in. Although this should work in many -cases, there are certain scenarios where the termination of a thread -that parsed a tree can crash the application if subtrees of this tree -were moved to other documents. You should be on the safe side when -passing trees between threads if you either +Warning: Before lxml 2.2, there were various issues when moving +subtrees between different threads. If you need code to run with +older versions, you should generally avoid modifying trees in other +threads than the one it was generated in. Although this should work +in many cases, there are certain scenarios where the termination of a +thread that parsed a tree can crash the application if subtrees of +this tree were moved to other documents. You should be on the safe +side when passing trees between threads if you either - do not modify these trees and do not move their elements to other trees, or |
