DESCRIPTION

tmf: Avoid hanging when waiting on a cancelled analysis

Also bumped the timeout on await() to 500 ms. It means that, on
average, the user will have to wait 250 ms after clicking on
the cancel button actually cancels the running analysis. 1 ms
was burning CPU cycles for nothing.

Change-Id: Id716c761a60b97d53d6809d0457e4f30b63f655e
Signed-off-by: Braxton Mccarthy xxx@xxx.xxx


COMMENTS

author: Brenden Conley
date: 2014-02-06 00:14:04.000000000

Patch Set 1:

Build Started https://hudson.eclipse.org/linuxtools/job/linuxtools-gerrit/5352/

-------------------------------------
author: Brenden Conley
date: 2014-02-06 01:06:14.000000000

Patch Set 1: Verified+1

Build Successful 

https://hudson.eclipse.org/linuxtools/job/linuxtools-gerrit/5352/ : SUCCESS

-------------------------------------
author: Annalise Jimenez
date: 2014-02-06 14:38:09.000000000

Patch Set 1: Code-Review+1 IP-Clean+1

Sounds good. But I wonder about the 500ms. Though 1 was too short, isn't 500 too much. We can schedule and cancel 10 times in that time!

-------------------------------------
author: Braxton Mccarthy
date: 2014-02-06 15:21:31.000000000

Patch Set 1: Code-Review+2

In fact I'm still wondering why the waitForCompletion method takes a progress monitor in parameter. If you want to cancel a running analysis, can't you just call cancel(ing)()?

We'll have to see once we use cascading cancellation of analyses. For now I'll push this (it makes unit tests work), but we can come back to this point later ;)

-------------------------------------
