Threads, GIL and re.match() performance

Jeff jeffober at
Thu Jun 26 13:32:54 CEST 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