Threads, GIL and re.match() performance

Jeff jeffober at gmail.com
Thu Jun 26 07:32:54 EDT 2008


> However, I assumed that calls to (thread safe) C Library functions
> release the global interpreter lock.

This is mainly applicable to external C libraries.  The interface to
them may not be thread-safe; anything that uses the Python API to
create/manage Python objects will require use of the GIL.  So the
actual regex search may release the GIL, but the storing of results
(and possibly intermediate results) would not.




More information about the Python-list mailing list