Created
August 26, 2012 12:41
-
-
Save jkinred/3478641 to your computer and use it in GitHub Desktop.
Is this thread unsafe?
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Foo(object): | |
def __init__(self, client): | |
self._cache = {} | |
self.client = client | |
def get(): | |
client.get_from_server() | |
class Bar(object): | |
def __init__(self, client): | |
self._cache = {} | |
self.client = client | |
def get(): | |
client.get_from_server() | |
client = Client("http://foo.com/sdk") | |
f = Foo(client) | |
b = Bar(client) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment