I think it’s important to step back and recognize that this entire thread — along with several similar discussions on the forum — is really just a symptom of a deeper, unresolved issue.
Most of us would probably agree that none of these problems would even exist if there were a supported, reliable way to programmatically close or terminate a Grasshopper (GH) definition — particularly when:
-
It’s run through the Grasshopper Player, or
-
It’s compiled via the Script Editor or Script Compiler.
Right now, users have to resort to workarounds and hacks, which are often unreliable or break across versions. That’s why I believe the real solution is to provide an official component or API call that allows a script to gracefully shut itself down once it’s done.
@eirannejad Ive written up a spec for the required GH component as I see it here:
If you build this/solve this larger issue all will be right in the world!
Cheers
DK