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

Feature: Add a time limit for op and objprint #96

Open
WangGithubUser opened this issue Aug 15, 2023 · 2 comments
Open

Feature: Add a time limit for op and objprint #96

WangGithubUser opened this issue Aug 15, 2023 · 2 comments

Comments

@WangGithubUser
Copy link

WangGithubUser commented Aug 15, 2023

Feature request

We can use op or objprint's option depth to control the time spend in printing.But, if we don't know the suitable depth, or even we don't know or can't know what the object is, a time limit can make the program to not stuck.

If you wish, I can bring you a implementation of this.

@gaogaotiantian
Copy link
Owner

It's true that objprint can in theory spend a long time iterating through the object, but that's not something we should deal with a timeout. print has a similar issue - it can be stuck printing an object, and the way to get out of it is just Ctrl+C. It's ultimiately in user's control and responsibility to make objprint work as they wish.

@WangGithubUser
Copy link
Author

WangGithubUser commented Aug 17, 2023

But a print seldom stuck, and if you run op with honor_existing=False, it will simply stuck.
And, for

and the way to get out of it is just Ctrl+C

,if I need batch processing?Maybe I need to print the object that can finish in a set time.

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

2 participants