On 10.12.2009, at 14:35, Matt Goodall wrote:
> 2009/12/10 ff <
fabio...@gmail.com>:
>> On Dec 10, 1:34 pm, Matt Goodall <
matt.good...@gmail.com> wrote:
>>> Last time I checked httplib2 was not thread safe, so python-couchdb
>>> won't be either.
>>
>> Yep, I'm digging into the code and I realize it. The main problem is
>> that it reuses the same Resource for each request. Transforming
>> self.resource into an accessor returning a fresh Resource each time
>> should fix it.
>
> Also:
>
> * httplib2 reuses existing connections from a cache. (Not sure if
> that's the same as the "Resource" stuff you mentioned, I can't
> remember the implementation now.)
> * httplib2 optionally caches responses. The cache implementations
> (filesystem, for instance) are not thread safe.
>
> Even then, there's no guarantee that python-couchdb is thread safe.
For what it's worth, thread-safety was one of the goals I had in mind for the httplib branch.