Skip to content

use tokio-free locks and results - #341

Merged
patrickelectric merged 2 commits into
mavlink:masterfrom
onur-ozkan:less-tokio
Jun 30, 2025
Merged

use tokio-free locks and results#341
patrickelectric merged 2 commits into
mavlink:masterfrom
onur-ozkan:less-tokio

Conversation

@onur-ozkan

Copy link
Copy Markdown
Member

Aims to reduce the dependency on tokio in async mode. This is the first step of #321 and the ultimate goal is to remove tokio entirely from the async interface.

Helps to #321.

Signed-off-by: Onur Özkan <work@onurozkan.dev>
Signed-off-by: Onur Özkan <work@onurozkan.dev>
@patrickelectric
patrickelectric merged commit a1654ff into mavlink:master Jun 30, 2025
45 checks passed

@joaoantoniocardoso joaoantoniocardoso left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool! Note that these two mutexes work slightly differently from each other, especially in terms of fairness.

@patrickelectric This also breaks the API, so the next release should be at least 0.16.

@onur-ozkan

Copy link
Copy Markdown
Member Author

I didn't change the API yet, I am planning to change it only when #321 is entirely closed. Then I can replace tokio-1 feature with async or something.

@onur-ozkan
onur-ozkan deleted the less-tokio branch June 30, 2025 14:21
@joaoantoniocardoso

Copy link
Copy Markdown
Contributor

I didn't change the API yet, I am planning to change it only when #321 is entirely closed. Then I can replace tokio-1 feature with async or something.

I assumed it changed since the error type changed from tokio::io::ErrorKind to std::io::ErrorKind in the mavlink-core/src/async_peek_reader.rs file.

@pv42 pv42 mentioned this pull request Jun 30, 2025
@onur-ozkan

Copy link
Copy Markdown
Member Author

I didn't change the API yet, I am planning to change it only when #321 is entirely closed. Then I can replace tokio-1 feature with async or something.

I assumed it changed since the error type changed from tokio::io::ErrorKind to std::io::ErrorKind in the mavlink-core/src/async_peek_reader.rs file.

It's just a re-export from std (see https://github.com/tokio-rs/tokio/blob/3e890cc0171ddb210acdcfec831b7c7bcbb0d2d9/tokio/src/io/mod.rs#L212-L215). So it should be fine.

@joaoantoniocardoso

Copy link
Copy Markdown
Contributor

I didn't change the API yet, I am planning to change it only when #321 is entirely closed. Then I can replace tokio-1 feature with async or something.

I assumed it changed since the error type changed from tokio::io::ErrorKind to std::io::ErrorKind in the mavlink-core/src/async_peek_reader.rs file.

It's just a re-export from std (see https://github.com/tokio-rs/tokio/blob/3e890cc0171ddb210acdcfec831b7c7bcbb0d2d9/tokio/src/io/mod.rs#L212-L215). So it should be fine.

oh, my bad!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants