-
Notifications
You must be signed in to change notification settings - Fork 43
Open
Milestone
Description
in the run function of agent, the serializer for sockets has been hardcoded to be 'pickle', shouldn't this be set to the serializer of the individual agents, or the global serializer in osbrain.config?
what i find is that 'pickle' was still used to serialize the parameters of passed functions, although i specifically set to use other serializers.
therefore, changing the global osbrain.config['SERIALIZER'] doesn't change this behaviour either
snippet in agent.py
@Pyro4.oneway
def run(self):
"""
Start the main loop.
"""
# A loopback socket where, for example, timers are processed
self.bind(
'REP',
alias='loopback',
addr='loopback',
handler=self._handle_loopback,
transport='inproc',
serializer='pickle',
)
# This in-process socket handles safe access to
# memory from other threads (i.e. when using Pyro proxies).
self.bind(
'REP',
alias='_loopback_safe',
addr='_loopback_safe',
handler=self._handle_loopback_safe,
transport='inproc',
serializer='pickle',
)
i believe the fix should be to set serializer=self._serializer instead of serializer='pickle'
Peque