I was wondering if there is a way to send a notification or something to a command that's currently running. Here's the setup of what I'm trying to do.
I have a project proxy which does all of the manipulation of the project elements in a work directory. The user can then save off an archive which is a long running process. To implement the archive, I created an archive command that is run and has to use things like setTimeout to keep the UI responsive (which really just updates a progress bar) while it's running.
I now need the ability to allow the user to "Cancel" the archive functionality. However, I can't figure out a way to let the the command know that it needs to be canceled without using any hacks like setting something in the proxy or something.
I considered making a "helper" proxy to just handle saving and loading to/from an archive (they need to be able to cancel loading also) and setting a "cancel" attribute on that guy but I thought I would ask if anyone had any better ideas or if this should've been a helper proxy all along or any other suggestions/comments.