Thread spinner; // the thread doing the processing public void userHitCancel() { spinner.suspend(); // whoa! if (askYesNo("Really Cancel?")) spinner.stop(); // stop it else spinner.resume(); // giddyap! }