'Move to New LINQPad Instance' does not respect QueryCancelToken
this.QueryCancelToken) can be extremely useful at times. I'm using it to register cleanup handlers (flushing lazy writers etc. pp.) and to perform timed waits that are cancelled when the script is cancelled instead of making the script hang around until it is done sleeping. In fact, I've migrated several important scripts from LINQPad 5 (and hence Framework) to LINQPad 7 (with NET6) only because of this feature.
Unfortunately, the cleanup handler does not fire when right-clicking on the register tab for a running script and invoking 'Move to New LINQPad Instance' (which simply kills the old process cold). This opens the door for stuff like lost log entries etc. pp. when the user forgets to explicitly cancel the script before invoking this menu item.
Is there some other mechanism that can be exploited to e.g. flush lazy writers in connection with 'Move to New LINQPad Instance'?