feat: support timeouts and deadlines - #1018
Conversation
This commit adds support for specifying deadlines for read and write
operations over UARTs in one of two ways:
1. By providing a deadline as an absolute time in the future as was
done before. These deadlines can be 'refreshed' through the
`set_deadline` methods.
2. By providing a timeout with which a new deadline will be computed
upon performing a read or write operation.
This allows for a precise handling of deadlines when leveraging the
std.Io.{Reader,Writer} interface semantics.
|
Hi @Grazfather, @mattnite! Feel free to make any comments and/or changes: I'm by no means a Zig expert! For instance, I believe the explicit dereference in the Thanks a ton for your time! |
tact1m4n3
left a comment
There was a problem hiding this comment.
Solid work! I like the direction of this. I only have a few style suggestions.
|
Also CI formatting seems to fail. You should run zig fmt on the file. Or you can just setup your editor to do that on save so you don't have to think about it. |
|
Hi @tact1m4n3! Thanks a ton for the input. I guess everything should be addressed and the pipelines are passing except for a the website generation which apparently fails when not being able to pull an external dependency. I'd be more than happy to squash all the commits before merging so as not to pollute Thanks again for the input! |
This commit adds support for specifying deadlines for read and write operations over UARTs in one of two ways:
By providing a deadline as an absolute time in the future as was done before. These deadlines can be 'refreshed' through the
set_deadlinemethods.By providing a timeout with which a new deadline will be computed upon performing a read or write operation.
This allows for a precise handling of deadlines when leveraging the std.Io.{Reader,Writer} interface semantics.
Closes #1017