Client - bogus use of threading.local
Bug #530229 reported by
Roger Binns
This bug affects 3 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Python Memcached |
Incomplete
|
Medium
|
Unassigned |
Bug Description
Client is derived from threading.local presumably at some misguided sense of working across multiple threads. However this doesn't work if the same Client is used across threads serially.
For instance if I create a client in one thread and then call set_servers and then use the Client in another thread the set_servers call would have had no effect since the servers and buckets are per-thread due to threading.local.
To post a comment you must log in.
This does also affect the way it works together with greenlets. Making it not inherit from threading.local gives the user the choice of how the client behaves.