Hi, Keith, I understand. The problem is that I run _prepare/_step/finalize in a thread lunched from GUI. And when the user press a {hot} key I want the thread terminated and statement gracefully closed. Now what I was thinking is to call some kind of function to cancel statement processing when a thread is deleted. Or am I looking at it wrong? Thank you.