Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Serial transport: prioritization of outgoing frames #75

pavel-kirienko opened this issue Sep 8, 2019 · 0 comments


Copy link

commented Sep 8, 2019

Currently, the serial transport does not respect the frame priority when scheduling transmission. Frame ordering is guaranteed within a transfer; transfers themselves, however, are unordered. That is, if there are multiple transfers awaiting transmission, their transmission slots will be allocated at random. The optimal behavior is to serve high-priority transfers first. This is the culprit:

for fr in frames:
async with self._port_lock: # TODO: the lock acquisition should be prioritized by frame priority!
compiled = fr.compile_into(self._serialization_buffer)

The synchronization primitive needs to be replaced with a priority-aware alternative.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
1 participant
You can’t perform that action at this time.