This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Added IndexManager.priorityAccess to suspend the background scan and checking for external changes during query. The methods IndexManager.readAccess and IndexManager.writeAccess were deprecated. The Index is now self guarded and global lock is not needed for correct synchronization.
Created attachment 115392 [details] Diff file
"One is good. The next good number is infinity." - I am not sure whether you will not need more priorities than single "priorityAccess". I was dreaming about a system where an activity can tell it wants to have more priority than a list of other activities. Such API would lead to creation of Poset.
>"One is good. The next good number is infinity." For the current usage to suspend the background operations by user requests simple bool type is enough. The background tasks (scan) should be suspended when ParserManager or TaskProcessor is performing task.
Fixed jet-main f4ac7c1f0cd6