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

Cache is_coroutine_function #4481

Merged
merged 1 commit into from
Feb 4, 2021

Conversation

ian-r-rose
Copy link
Collaborator

@ian-r-rose ian-r-rose commented Feb 3, 2021

Fixes #4469 , fixes #4482, fixes #4483, alternative to #4474
Uses cached version of is_coroutine_function in stream handling to mitigate re-checking the same function many times.

  • Tests added / passed
  • Passes black distributed / flake8 distributed

Copy link
Member

@jakirkham jakirkham left a comment

Choose a reason for hiding this comment

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

Thanks Ian! 😄

This looks good generally. Had a couple questions on the details

distributed/core.py Outdated Show resolved Hide resolved
Copy link
Member

@jakirkham jakirkham left a comment

Choose a reason for hiding this comment

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

Thanks Ian! 😄

Looks like there is small naming error on CI. Also made one minor aliasing suggestion

distributed/utils.py Outdated Show resolved Hide resolved
distributed/utils.py Outdated Show resolved Hide resolved
distributed/utils.py Outdated Show resolved Hide resolved
@ian-r-rose ian-r-rose force-pushed the cache-is-coroutine-function branch from cf0cdf9 to 7a9fba0 Compare February 4, 2021 01:17
mitigate re-checking the same function many times.

Decorate function definition, cache all function definitions.

Oops, cache is python 3.9-only

Alias duplicate function.

Use distributed's version of this util.

bad rebase.
@ian-r-rose ian-r-rose force-pushed the cache-is-coroutine-function branch from 982baad to 893a91f Compare February 4, 2021 01:20
@jakirkham jakirkham merged commit 54bfc2f into dask:master Feb 4, 2021
@jakirkham
Copy link
Member

Thanks Ian! 😄

@ian-r-rose
Copy link
Collaborator Author

Thanks for the review @jakirkham!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants