New issue 208 by kxepal: Problems with http cache in multitheaded
environment.
http://code.google.com/p/couchdb-python/issues/detail?id=208
What steps will reproduce the problem?
1. Create multitheaded script
2. Share Database instance between threads
3. Make a lot of requests until crush happens (see exception.log attachment)
There are two different exceptions, but I suppose that they have same
nature.
I'll make test script and patch a little bit later, just have created issue
to not forget about this problem.
Attachments:
exception.log 2.4 KB
Attached patch and test case
Attachments:
01-issue-208-test_http.patch 2.9 KB
02-issue-208-http.patch 901 bytes
Forgot to add test case to suite, also named it well.
Attachments:
01-issue-208-test_http.patch 3.1 KB
That looks like it should work, thanks!
I extracted the cache code from http.Session recently to make it more
testable but haven't pushed it yet. My fault entirely, but do you mind if I
rework your patch on top on my changes? Should I post the new diff back
here for you to check before I commit with your name against it?
There is no problem if you make patch for my patch - finally, we all works
for the same project and I always like to see what things I've missed(:
Matt, a ping on this?