reload the script when it changes; the thread inside the script must run inside the CLR, not in native code (for example blocked Monitor.Wait)