[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[mylyn-dev] Mylyn never lets the JobManager be idle?
|
Hi all,
To begin with, thanks for mylyn - it's a very neat idea and works
nicely.
I'm trying to integrate it with my eclipse application and it works
nicely; However, I've got two questions I'd like to ask; since the
second one is completely separate to this one, I'll ask it in a
following email.
It seems to me, that mylyn never lets the job manager be idle. I know
this, because when running PDE unit tests, I use this method on my
setUp() to make sure that eclipse is ready to be used:
public static void waitForJobs() throws Exception {
while (!Job.getJobManager().isIdle()) {
delay(1000);
}
}
(delay waits for x ms, while letting the ui process events). This was
worked quite well in a number of eclipse projects I've worked on, with
multiple plugins.
When running mylyn, the jobmanager is never idle. Running this through a
debugger, it looks like the Flush Cache Job and the Task List Saver
always run. Indeed, looking at CacheFlushJob, which is nested inside
org.eclipse.mylyn.internal.tasks.ui.OfflineCachingStorage, it seems to
be in a while(true) loop. The exact same is true for TaskListSaverJob,
which is inside
org.eclipse.mylyn.internal.tasks.ui.util.TaskListSaveManager
Is this the intended behaviour? Is my waitForJobs() code a bad way to
make sure everything's ready before running the tests? Wouldn't it be a
better solution for the two jobs to schedule themselves to run again
later?
Thanks,
Stefanos
Visit our website at http://www.ubs.com
This message contains confidential information and is intended only
for the individual named. If you are not the named addressee you
should not disseminate, distribute or copy this e-mail. Please
notify the sender immediately by e-mail if you have received this
e-mail by mistake and delete this e-mail from your system.
E-mails are not encrypted and cannot be guaranteed to be secure or
error-free as information could be intercepted, corrupted, lost,
destroyed, arrive late or incomplete, or contain viruses. The sender
therefore does not accept liability for any errors or omissions in the
contents of this message which arise as a result of e-mail transmission.
If verification is required please request a hard-copy version. This
message is provided for informational purposes and should not be
construed as a solicitation or offer to buy or sell any securities
or related financial instruments.
UBS Limited is a company registered in England & Wales under company
number 2035362, whose registered office is at 1 Finsbury Avenue,
London, EC2M 2PP, United Kingdom.
UBS AG (London Branch) is registered as a branch of a foreign company
under number BR004507, whose registered office is at
1 Finsbury Avenue, London, EC2M 2PP, United Kingdom.
UBS Clearing and Execution Services Limited is a company registered
in England & Wales under company number 03123037, whose registered
office is at 1 Finsbury Avenue, London, EC2M 2PP, United Kingdom.