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

Problem with timeout in ApplicationCommandLine examples #424

Open
rrthomas opened this issue Feb 19, 2025 · 0 comments
Open

Problem with timeout in ApplicationCommandLine examples #424

rrthomas opened this issue Feb 19, 2025 · 0 comments

Comments

@rrthomas
Copy link
Contributor

Describe the bug

All of the ApplicationCommandLine examples contain the following call:

		set_inactivity_timeout (10000);

It's not obvious why this is needed (removing it seems to cause no harm), and examples 1 & 4 hang for 10s if invoked without command line arguments (however, examples 0 and 3 do not).

I looked at the corresponding C examples in the GLib repo, and only one of them, example 3, suffers from the hang, though again all contain the timeout call. I have also filed https://gitlab.gnome.org/GNOME/glib/-/issues/3615

Expected behavior
I'm not exactly sure what to expect, since I haven't been able to understand what the default state of the reference count is in the application. For example, is there an initial count of 0, and hence the timeout is needed to avoid a race condition?

But in any case, the examples should not hang when invoked with no arguments.

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