mirror of
https://github.com/SabreTools/MPF.git
synced 2026-02-09 05:35:27 +00:00
[Request] Prevent more than one instance of DICUI from running #165
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @gingerbeardman on GitHub (Jan 16, 2020).
Sometimes I click twice because it takes a while to load on my PC, other times, I forget I have it running.
Having two instances scan the drive at the same time seems a bad idea.
Regardless, it would be good if the app stopped launching if there was already an instance of it running. At least as an option.
@superg commented on GitHub (Jan 26, 2020):
Why would you do that?
I have two drives and I dump 2 discs at once.
@Whovian9369 commented on GitHub (Jan 26, 2020):
Good for you, but not everyone does. Maybe a config option for this would be good then?
So people who want to dump two discs at once can, while those that don't want to have two instances open can't accidentally open an extra window.
@superg commented on GitHub (Jan 26, 2020):
Well, most of PC GUI applications will open one more instance if you run it again. Should we also "fix" them all? :)
@Whovian9369 commented on GitHub (Jan 26, 2020):
Well in this case if the dev is willing to implement it in whatever program, then I don't see why not
@mnadareski commented on GitHub (Jan 28, 2020):
I'm going to preface this one by saying: I have no idea how to do this. Nearly every program I've written has been made with the express intention of having multiple versions running at once without having too many issues. I personally don't see a reason to add this, at the moment, but I will keep this open with the
help wantedtag in case an enterprising soul wants to add this to the options.@gingerbeardman commented on GitHub (Jan 28, 2020):
The important thing is that you don't really prevent launching, you just quit ASAP if you realise you're not the first instance.
An easy approach is to use a lock file (MutEx) which is created on launch and deleted on quit. If the file already exists then the app would quit.
Another approach is to look for other windows with your application title/ID.
More here
@ehw commented on GitHub (Feb 17, 2020):
I was wondering, would it be doable and preferable if instead of opening multiple instances of DICUI, if DICUI could have multiple "tabs" for each drive letter that can be managed separately? Or maybe just the ability to start up or queue additional tasks for different drive letters within the same instance of DICUI?
Being able to dump from multiple drives at once would be a great for large scale archive projects. I can see preservation groups having to deal with hundreds of discs and there should be a solution that makes it easy for this...
@mnadareski commented on GitHub (Feb 18, 2020):
I'm going to just leave this issue open for a long, long time. There's already too many conflicting opinions on how to handle multiple instances of DICUI both here and elsewhere. Honestly, use it however you want. If you want to have the ability only open it once, then please, open a PR and do the work to add it as an option. If you want to have some sort of unified way of having DIC instances running from one DICUI instance, please open a PR, and do the work. If you're fine with how it is, then great.
The amount of effort that would have to go into any of these solutions is outside the scope of what I am willing to do for this project at this time. If there are things that are legitimately causing issues with multiple instances, then open an issue for those specifically. I'm a bit limited by what DIC itself is capable of as well with regards to multiple instances simultaneously.
@mnadareski commented on GitHub (Oct 11, 2023):
Both this and the related item are not up for debate anymore. MPF will neither stop you from creating multiple instances nor recommend that you do. Users who choose to do one or the other will have to deal with how their computer handles that situation.