iotile / iotile/coretools

Add exponential backoff in rpc done polling code

Open
#331 0 comments 0 reactions 0 assignees View on GitHub
transport-jlink type:enhancement
Dominant language
Python
Stars
14
Forks
7
PR merge metrics
No merged PRs in 30d

Description

Right now there is a fixed polling interval of `1 ms`, however for long running rpcs this will be inefficient. There should be an exponential backoff in the polling interval based on the number of polling attempts made starting at 1 ms and backing off so some reasonable value like `100 ms` so that short RPCs are not delayed but long rpcs do not get overpolled:

https://github.com/iotile/coretools/blob/master/transport_plugins/jlink/iotile_transport_jlink/jlink_background.py#L125

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.