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.

Bug 207915

Summary: Added IndexManager.priorityAccess to suspend background IO during query
Product: editor Reporter: Tomas Zezula <tzezula>
Component: Parsing & IndexingAssignee: apireviews <apireviews>
Status: RESOLVED FIXED    
Severity: normal Keywords: API, API_REVIEW_FAST
Priority: P3    
Version: 7.2   
Hardware: All   
OS: All   
Issue Type: TASK Exception Reporter:
Attachments: Diff file

Description Tomas Zezula 2012-01-30 14:31:30 UTC
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.
Comment 1 Tomas Zezula 2012-01-30 14:35:00 UTC
Created attachment 115392 [details]
Diff file
Comment 2 Jaroslav Tulach 2012-02-02 19:04:20 UTC
"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.
Comment 3 Tomas Zezula 2012-02-03 08:13:50 UTC
>"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.
Comment 4 Tomas Zezula 2012-02-06 10:15:52 UTC
Fixed jet-main f4ac7c1f0cd6