Skip to content

Add docstring for run_in_thread #53

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

nikochiko
Copy link
Member

To:

  • clarify the behavior
  • add note that it won't work with inline functions - lambdas and closures.

To:
- clarify the behavior
- add note that it won't work with inline functions - lambdas and closures.
Copy link

LGTM 👍

Copy link

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

PR Summary

This PR enhances the docstring for run_in_thread to clearly explain its multi-threading mechanism, caching behavior, and limitations with inline functions.

• Updated the documentation in /py/gooey_gui/core/state_interactions.py to clarify that run_in_thread returns None initially and later the callable's result.
• Added a note emphasizing that inline functions (lambdas/closures) won’t work due to reliance on fn.name.
• Detailed cache behavior when cache=True.

1 file(s) reviewed, no comment(s)
Edit PR Review Bot Settings | Greptile

@nikochiko nikochiko requested review from devxpy and anish-work March 31, 2025 16:40
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.

2 participants