Skip to content

Instantly share code, notes, and snippets.

@kvalv
Created February 25, 2016 11:10
Show Gist options
  • Select an option

  • Save kvalv/1f6e28476496bc539c35 to your computer and use it in GitHub Desktop.

Select an option

Save kvalv/1f6e28476496bc539c35 to your computer and use it in GitHub Desktop.
from multiprocessing.managers import BaseManager
class QueueManager(BaseManager): pass
QueueManager.register('get_queue')
m = QueueManager(address=('78.91.11.26', 50000), authkey='lol')
m.connect()
queue = m.get_queue()
while True:
i = raw_input("write GET or WRITE")
if i.lower() == "write":
text = raw_input("text: ")
queue.put(text)
else:
print(queue.get(0))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment