Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

aipc, an async ipc library for aero#60

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
pitust wants to merge2 commits intoAndy-Python-Programmer:master
base:master
Choose a base branch
Loading
frompitust:aipc

Conversation

pitust
Copy link
Contributor

'nuff said.

@pitustpitust changed the titleIntroducing aipc, an async ipc library for aeroaipc, an async ipc library for aeroMar 19, 2022
@48cf
Copy link
Collaborator

I'm not a fan of all theseprintln!s polluting the stdout of the running process, even if they are unlikely to happen in most cases. You should returnResults instead of printing the error and carrying on/signaling failure upstream. Also there is quite a few unwraps that could be turned intoResults too.

@pitust
Copy link
ContributorAuthor

I'm not a fan of all theseprintln!s polluting the stdout of the running process, even if they are unlikely to happen in most cases. You should returnResults instead of printing the error and carrying on/signaling failure upstream. Also there is quite a few unwraps that could be turned intoResults too.

I could possibly move them tosys_log, as not to pollute stdout. The majority of the errors shouldn't propagate aboveAsyncRuntime::run() anyway.

The unwraps are there because I explicitly wanted to prevent injectingResult, but if you have an idea how to make it work without destroying the ergonomics, please tell me!



fn main() {
let mut rt = aipc::async_runtime::AsyncRuntime::new();

Choose a reason for hiding this comment

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

Instead of constructing a runtime manually at the start of the main function, it would be a much cleaner idea to initialize it lazily in the spawn function instead. So it will look likeapic::spawn(async {}). In future we; after we get the rust userland port sorted out we can switch to usingtokio as our async runtime.

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

@Andy-Python-ProgrammerAndy-Python-ProgrammerAndy-Python-Programmer left review comments

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

3 participants
@pitust@48cf@Andy-Python-Programmer

[8]ページ先頭

©2009-2025 Movatter.jp