You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This probably isn't a huge issue, but I just realized that CassetteContextDecorator is not threadsafe. If you were to call a function that is decorated with use_cassette from two different threads, the __finish attribute of the function could be overwritten before the first call to the function returns. This would make it so the first unpatch never occurs, and also attempt to do a next() on a None object.
The text was updated successfully, but these errors were encountered:
I think that this is actually a pretty serious issue. If there is a test runner that does single process threaded test execution, decorated functions could present a problem.
colonelpanic8
changed the title
CassetteContextDecorator is not threadsafe
use_cassette decorated functions are not reentrant
May 10, 2015
This probably isn't a huge issue, but I just realized that CassetteContextDecorator is not threadsafe. If you were to call a function that is decorated with use_cassette from two different threads, the
__finish
attribute of the function could be overwritten before the first call to the function returns. This would make it so the first unpatch never occurs, and also attempt to do anext()
on a None object.The text was updated successfully, but these errors were encountered: