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

Update base_convert to set a single object #8

Open
psychemedia opened this issue Dec 6, 2024 · 0 comments
Open

Update base_convert to set a single object #8

psychemedia opened this issue Dec 6, 2024 · 0 comments

Comments

@psychemedia
Copy link
Contributor

psychemedia commented Dec 6, 2024

Currently, base_convert sets several model parameters separately:

base_convert(self, input_text, output_template="", force=False, params=None):
        self.set_output_template(output_template)
        self.params = params if params else {}
        self.set_doc_content(input_text, force=force)

Should this all be in a single dict? Actually, a tuple, so we can unpack it in one go?

In a non-blocking route, could there be races in reading and/or changing things? Could there be races anyway?

We could also have a msg ID in the dict; incrementing this for each convert request should force a new model update too? The response object could then also include the msg ID.

What happens if in non-blocking there are several convert requests on the py side? Can we lose messages on the js side? Eg if there is an onchange in the dict, does the handler get a reference to the dict? If there are two rapid onchanges, could the first onchange handler end up reading the dict values that created the second onchange event?

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

No branches or pull requests

1 participant