Closed brean closed 4 years ago
I think it was intended to call the parameters using functools.partial on the service as I am doing it in MyAsyncServiceProxy
Turns out run_in_executor
takes *args, but not **kwargs (https://docs.python.org/3/library/asyncio-eventloop.html#asyncio.loop.run_in_executor). That's really unfortunate, and I wish I had caught this in a test. A PR to wrap the send
args/kwargs in partial would be very appreciated!
Hi,
I am using aiorospy to communicate with rosplan. To update my ROSPlan knowledge base I need to send a KnowledgeItem with some parameters. So I created my own send-function that allows parameters on the service call:
Based on https://github.com/locusrobotics/aiorospy/blob/master/aiorospy/src/aiorospy/service.py#L33
I think it was intended to call the parameters using
functools.partial
on the service as I am doing it inMyAsyncServiceProxy
but I am not providing a PR because I am not sure if there is a case where you need to call these parameter onrun_in_executor
?