pynng
pynng copied to clipboard
AIO performance improvement by making AIOHelper persistent
Currently each Socket
instance is creating a new AIOHelper
object on each async operation.
This PR modifies AIOHelper
to allow it to be created once at Socket
instantiation and is reused per async operation.
The AIOHelper
class creates a pair of nng_aio
contexts (one for send
, and one for recv
), so there can be only one pending AIO operation per direction - I think this is ok, but would like feedback on this.
Things have been pretty busy over in my neck of the woods for the last few months, and I'm trying to pick pynng back up now. I'm hoping to review this soon!
Do you mind rebasing this against master so it will run with the CI that I (finally) fixed?