I can't seem to share a set across processes using a Manager instance. A condensed version of my code:
from multiprocessing.managers import SyncManager
manager = SyncManager()
manager.start()
manager.register(Set)
I've also tried register(type(Set))
and register(Set())
, but I'm not overly surprised that neither of them worked (the first should evaluate to Class, I think).
The exception I get in all cases is TypeError: __name__ must be set to a string object
in line 675 of managers.py.
Is there a way of doing this, or do I need to investigate alternatives?