Thread-safe .set_script()

15 jobs for !2859 with noc-1140 in 20 minutes and 26 seconds (queued for 4 seconds)
merge request