Skip to content

Refactor Dispatchers #353

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

Merged
merged 6 commits into from
Apr 29, 2021
Merged

Refactor Dispatchers #353

merged 6 commits into from
Apr 29, 2021

Conversation

rmorshea
Copy link
Collaborator

@rmorshea rmorshea commented Apr 24, 2021

Close: #298, #352

This switches from a class-based approach to one that leverages pure functions. While the logic itself isn't any simpler, it was easier to implement (and hopefully understand) correctly. This conversion was motivated by several bugs that had cropped up and that wouldn't be easily fixable without substantial changes refactor or not.

The one thing that still gets me is the lack of uniformity in usage, but I suppose that's alright given how different the "shared" vs "single" view implementations are.

@rmorshea rmorshea force-pushed the fix-298 branch 4 times, most recently from a3e58ca to ce5ffab Compare April 24, 2021 17:42
Simplify them greatly by making them normal functions.
This avoids a lot of indirection and complexity caused
by inheritance.

In addition this fixes some impropper usages of TaskGroups
which was causing problems in the SharedClientStateServer
implementations.

This refactor also allowed us to get rid of the clunky
HasAsyncResources util class. In the end it just added
confusion.
@rmorshea rmorshea merged commit bc12fd7 into main Apr 29, 2021
@rmorshea rmorshea deleted the fix-298 branch April 29, 2021 03:18
@Archmonger
Copy link
Contributor

Hell yeah! Whenever this build gets moved over to PyPi I will begin Conreq integrations.

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.

IDOM causes race condition in AnyIO
2 participants