Issue 440 - Don't purge from memory those projects with pending operations

git-svn-id: http://google-refine.googlecode.com/svn/trunk@2222 7d457c2a-affb-35e4-300a-418c747d4874
This commit is contained in:
Tom Morris 2011-08-28 22:00:02 +00:00
parent 420e74c6f4
commit e174bb163a

View File

@ -73,9 +73,9 @@ public abstract class ProjectManager {
transient protected InterProjectModel _interProjectModel = new InterProjectModel(); transient protected InterProjectModel _interProjectModel = new InterProjectModel();
/** /**
* Flags * Flag for heavy operations like creating or importing projects. Workspace saves are skipped while it's set.
*/ */
transient protected int _busy = 0; // heavy operations like creating or importing projects are going on transient protected int _busy = 0;
/** /**
* While each project's metadata is loaded completely at start-up, each project's raw data * While each project's metadata is loaded completely at start-up, each project's raw data
@ -255,7 +255,9 @@ public abstract class ProjectManager {
records.add(new SaveRecord(project, msecsOverdue)); records.add(new SaveRecord(project, msecsOverdue));
} else if (startTimeOfSave.getTime() - project.getLastSave().getTime() > s_projectFlushDelay) { } else if (!project.getProcessManager().hasPending()
&& startTimeOfSave.getTime() - project.getLastSave().getTime() > s_projectFlushDelay) {
/* /*
* It's been a while since the project was last saved and it hasn't been * It's been a while since the project was last saved and it hasn't been
* modified. We can safely remove it from the cache to save some memory. * modified. We can safely remove it from the cache to save some memory.
@ -435,7 +437,8 @@ public abstract class ProjectManager {
//--------------Miscellaneous----------- //--------------Miscellaneous-----------
/** /**
* Sets the flag for long running operations * Sets the flag for long running operations. This will prevent
* workspace saves from happening while it's set.
* @param busy * @param busy
*/ */
public void setBusy(boolean busy) { public void setBusy(boolean busy) {