[issue23191] fnmatch regex cache use is not threadsafe

2015-01-08 Thread M. Schmitzer
New submission from M. Schmitzer: The way the fnmatch module uses its regex cache is not threadsafe. When multiple threads use the module in parallel, a race condition between retrieving a - presumed present - item from the cache and clearing the cache (because the maximum size has been

[issue23191] fnmatch regex cache use is not threadsafe

2015-01-08 Thread M. Schmitzer
M. Schmitzer added the comment: Ok, if that is the attitude in such cases, feel free to close this. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23191

[issue23191] fnmatch regex cache use is not threadsafe

2015-01-08 Thread M. Schmitzer
M. Schmitzer added the comment: @serhiy.storchaka: My thoughts exactly, especially regarding the caching being implicit. From the outside, fnmatch really doesn't look like it could have threading issues. The patch also looks exactly like what I had in mind