Interrupt a Universal Robot in the middle of a move using URScript

How do I interrupt a Universal Robot’s Move function based on an external input (using threading in URScript)?