Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[cdt-dev] [DSF] GDBBackend.MonitorJob.kill not working?


I am looking at GDBBackend.MonitorJob.kill, and not quite sure how it can work. The
code is:

	 void kill() {
            synchronized(fMonProcess) {
                if (!fMonitorExited) {
                    getThread().interrupt();
                }
            }
        }

So, it tries to interrupt the worker thread. However, the worker thread does this:

	IStatus run(IProgressMonitor monitor) {
            synchronized(fMonProcess) {
	    }
        }

It seems like 'kill' won't get a change to call 'interrupt' until 'run' has exited, which
makes 'kill' entirely unhelpful?

Thanks,

--
Vladimir Prus
CodeSourcery / Mentor Graphics
http://www.mentor.com/embedded-software/


Back to the top