-
-
Notifications
You must be signed in to change notification settings - Fork 221
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
feat: Add function numberOfInstances() #90
Conversation
This function returns the number of running instances, by adding a new variable in InstancesInfo. This closes itay-grudev#89.
It's easy to use Github Actions to test on multiple OSs and multiple versions of Qt, so use it instead of travis.ci. SingleApplication submodule URL is also modified in this commit, please change it back after itay-grudev/SingleApplication#90 is merged.
It's easy to use Github Actions to test on multiple OSs and multiple versions of Qt, so use it instead of travis.ci. SingleApplication submodule URL is also modified in this commit, please change it back after itay-grudev/SingleApplication#90 is merged.
It's easy to use Github Actions to test on multiple OSs and multiple versions of Qt, so use it instead of travis.ci. SingleApplication submodule URL is also modified in this commit, please change it back after itay-grudev/SingleApplication#90 is merged.
It's easy to use Github Actions to test on multiple OSs and multiple versions of Qt, so use it instead of travis.ci. SingleApplication submodule URL is also modified in this commit, please change it back after itay-grudev/SingleApplication#90 is merged.
I met a problem: The destructor is not called after |
What's more, it would fail if one instance crashed. |
I have a solution which can deal with QCommandLineParser, but not crash: Use |
What about use LocalServer to send a message and wait for replies from other instances in 100ms? |
I came up with a trick: Since my actual need is to know whether the current instance is the only running instance, call |
I don't know which solution is the best, or if there are better solutions. However, this PR may be useless. Close this if you like, or tell me how to improve it so that it works correctly after a crash. |
Yhea. An instance crashing is a serious problem I had to deal with. here is not much you can do about it. Also the Qt I'll think about it for a bit and if I can't come up with an alternative I will close it. |
Close this in favor of #91 |
This function returns the number of running instances, by adding a new variable in InstancesInfo.
This closes #89.