Problem with multiprocessing managers

M

Metalone

From the documentation for Using a remote manager there is the
following example code:

from multiprocessing.managers import BaseManager
import Queue
queue = Queue.Queue()
class QueueManager(BaseManager): pass
QueueManager.register('get_queue', callable=lambda:queue)
m = QueueManager(address=('', 50000), authkey='abracadabra')
s = m.get_server()
s.serve_forever()

I don't know how to stop the server.
The documentation states that to call shutdown(), start() must be used
instead of server_forever().
If I use m.start() instead of m.get_server().server_forever() I
receive a PicklingError.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,056
Latest member
GlycogenSupporthealth

Latest Threads

Top