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

helpers use weakref #350

Merged
merged 4 commits into from
Feb 5, 2024
Merged

helpers use weakref #350

merged 4 commits into from
Feb 5, 2024

Conversation

j042
Copy link
Member

@j042 j042 commented Feb 5, 2024

Overview

to avoid circular reference, we keep weakref of the helpee within helpers. See tataratat/gustaf#185.
Turns out, keeping everything weakref doesn't allow "chained"-one-line uses. So, we will just create helpers that don't have states on the fly. Ones that have states will use weakref - they are okay, since we won't use them in "chained"-one-lines.

Addressed issues

@j042 j042 requested review from jzwar and clemens-fricke and removed request for jzwar February 5, 2024 09:53
@j042 j042 changed the base branch from main to cu-data_name-to-data February 5, 2024 10:18
@j042 j042 changed the title [WIP] helpers use weakref helpers use weakref Feb 5, 2024
@j042 j042 requested a review from jzwar February 5, 2024 13:31
Copy link
Collaborator

@jzwar jzwar left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for fixing copy-paste mistakes and typos, too!

@j042 j042 force-pushed the cu-data_name-to-data branch from 3d5fb94 to 196c97f Compare February 5, 2024 13:59
Base automatically changed from cu-data_name-to-data to main February 5, 2024 13:59
@j042 j042 force-pushed the ft-helper-weakref branch from 830fc93 to 1d430c7 Compare February 5, 2024 14:10
@@ -53,7 +54,7 @@ def valid_queries(spline, queries):
return True


class Checker:
class Checker(_HelperBase):
Copy link
Member Author

Choose a reason for hiding this comment

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

no need for helperbase

@j042 j042 force-pushed the ft-helper-weakref branch from 1d430c7 to 1e337ad Compare February 5, 2024 14:46
@j042 j042 merged commit 8a4c305 into main Feb 5, 2024
20 of 21 checks passed
@j042 j042 deleted the ft-helper-weakref branch February 5, 2024 14:46
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.

use weakref to save "helpee"
2 participants