smbinterp/bin/server.py

17 lines
395 B
Python
Raw Normal View History

2011-03-02 22:26:04 -08:00
#!/usr/bin/env python
from multiprocessing.managers import BaseManager
import Queue
2011-03-29 07:16:13 -07:00
inqueue = Queue.Queue()
2011-03-02 22:26:04 -08:00
outqueue = Queue.Queue()
class QueueManager(BaseManager):
pass
QueueManager.register('get_inqueue', callable=lambda:inqueue)
QueueManager.register('get_outqueue', callable=lambda:outqueue)
2011-03-30 19:27:42 -07:00
m = QueueManager(address=('', 6666), authkey='asdf')
2011-03-02 22:26:04 -08:00
s = m.get_server()
s.serve_forever()