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

Replaces unnessary async methods with coroutine generating methods #108

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

AsgeirNoM
Copy link

Methods have been stripped of async and now return Coroutine[Any, Any, Response] why?

  • The async methods did not do anything requiring scheduling.

  • Running them synchronously and returning the actually async parts as Coroutines means the loop now has to schedule and plan half the number of tasks, while the logic remains the same.

  • Due to returning the Coroutines the following was changed:

    • await wait_hello_from_server now returns Literal[True] instead of None
    • await wait_for_idle_response didn't have a return type, but now returns Literal[True]

Test was altered, why?

  • It also failed in the main branch, I didn't really investigate but it seams odd that it would be off by 2.

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.

1 participant