Skip to content

Instantly share code, notes, and snippets.

@jkinred
Created August 26, 2012 12:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jkinred/3478641 to your computer and use it in GitHub Desktop.
Save jkinred/3478641 to your computer and use it in GitHub Desktop.
Is this thread unsafe?
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