I'm using pyro5, and I want to make a remote object function as a worker class, where a client can ask it to perform various tasks by sending it functions to execute.
For this to work, I need to serialize functions, but the serializers available through Pyro5 does not support serializing functions.
Instead, I intend to use Dill, and somehow send the already serialized function through Pyro5.
However, when trying to serialize a function, I receive errors which say that I can't serialize X, where X is the enclosing class where the function lives. How can I prevent this from happening?
Actually, I was not able to reproduce this in a small script with a class and a function. I am running the dill serializer in a Qt app, not sure if that's the problem?
Alternatively, does anyone have a better idea on how to approach this?