04-16-2021 07:51 AM
Quick question: if a built executable starts an asynchronous call to a long-ish running VI, then the user fully exits the application right after, does the asynchronously called VI just stop mid-execution? I'll attach a photo, just so the Open VI Ref options can be seen:
Saying "Thanks that fixed it" or "Thanks that answers my question" and not giving a Kudo or Marked Solution, is like telling your waiter they did a great job and not leaving a tip. Please, tip your waiters.
04-16-2021 11:16 AM - edited 04-16-2021 11:18 AM
Just exit gracefully and close the ref on app exit and you won't have to ask that question.
Edit:
Or did you want the async VI to keep running after closing?
04-16-2021 11:25 AM
I would want the async VI to finish or at least know if it didn't finish. More of a general question so I can plan out how to structure the code.
Saying "Thanks that fixed it" or "Thanks that answers my question" and not giving a Kudo or Marked Solution, is like telling your waiter they did a great job and not leaving a tip. Please, tip your waiters.
04-16-2021 11:34 AM - edited 04-16-2021 11:34 AM
Oh, I get it. I think just make sure to send the async VI a message to make sure it understands that it should exit so it can exit gracefully. Using a queue works nicely. I think it is standard practice to close the VI ref directly after the async call. It won't close it until after you are done with it. I'm not an expert at this, but that's what I believe needs to be done.