Skip to content

JobManager.isIdle() is not working as expected #741

@laeubi

Description

@laeubi

what I do:

private void waitForAnyJobs(IJobManager manager) {
		debug("Suspend JobManager...");
		manager.suspend();
		debug("Wait for JobManager become idle...");
		while (!manager.isIdle()) {
			Thread.onSpinWait();
		}
		debug("JobManager is idle... no new jobs will run!");
	}

what I see:

After calling waitForAnyJobs I still see jobs running:

Job Periodic workspace save.(7) aboutToRun...
Job Periodic workspace save.(7) running...
Job Building(4) sleeping...
Project component was found
Suspend JobManager...
Wait for JobManager become idle...
Job Periodic workspace save.(7) done...
JobManager is idle... no new jobs will run!
Job Registry event dispatcher(40) scheduled...
Job Updating index names(16) scheduled...
Job Java indexing... (38) done...
Job Compacting resource model(14) done...
Job Building(4) done...
Job Reporting encoding changes.(9) done...
Job Flushing content description cache.(11) done...

I checked with debugger that no (user) code calls resume... so my assumption would be that jobs are schedule but never complete afterwards, but what I see in the log is done, and even schedule/done results.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions