balanced/balanced-python — pull request #16 by streed (2012-09-30 06:20:56+00:00)
Title: Removeal of threading.Local causing multithreading issues because the co...

...nfig.api_key_secret would be set to None each time

I understand the idea of having the config be a threading.Local but in most use cases, mine included, I have had no real need to switch between multiple api keys. Of course I could be wrong and switching between different market places is more common place than I think then this can be ignored.

Included a test that runs two threads and saves the current API secret and then makes sure they are the same.

Based on the use case in: https://github.com/balanced/balanced-python/issues/5
And my use case this fixes it.

It could also make sense to maybe have a second config something along the lines of `async_config` or something or another so that it is more explicit to the user that this config will be the same across threads and should be immutable to some extent.