ydk-gen
ydk-gen copied to clipboard
Async support for XYZServiceProviders
Support for async rpc calls to devices via different service providers. Netconf transactions commit could be slow for some devices, where it takes 60 second for synchronous reply. It would be good, if ydk supports async rpc semantics where instead of blocking calls, future results could be gotten later for the rpc.
A synchronous call to the simple RPC GetFeature is nearly as straightforward as calling a local method. The RPC call waits for the server to respond, and will either return a response or raise an exception:
feature = stub.GetFeature(point)
An asynchronous call to GetFeature is similar, but like calling a local method asynchronously in a thread pool:
feature_future = stub.GetFeature.future(point)
feature = feature_future.result()