Skip to content

Instantly share code, notes, and snippets.

@KrzysztofCiba
Created February 19, 2013 18:31
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 KrzysztofCiba/4988557 to your computer and use it in GitHub Desktop.
Save KrzysztofCiba/4988557 to your computer and use it in GitHub Desktop.
from multiprocessing import Process, Manager
def sender( S ):
print "sending 256 MB"
S["foo"] = "."*256*1024*1024
if __name__ == '__main__':
m = Manager()
S = m.dict()
p1 = Process( target=sender, args=( S, ) )
p1.start()
p1.join()
print "'read' it all", len(S["foo"])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment