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 - Added IndexManager.priorityAccess to suspend background IO during query
Summary: Added IndexManager.priorityAccess to suspend background IO during query
Status: RESOLVED FIXED
Alias: None
Product: editor
Classification: Unclassified
Component: Parsing & Indexing (show other bugs)
Version: 7.2
Hardware: All All
: P3 normal (vote)
Assignee: apireviews
URL:
Keywords: API, API_REVIEW_FAST
Depends on:
Blocks:
 
Reported: 2012-01-30 14:31 UTC by Tomas Zezula
Modified: 2012-02-06 10:15 UTC (History)
0 users

See Also:
Issue Type: TASK
Exception Reporter:


Attachments
Diff file (4.73 KB, patch)
2012-01-30 14:35 UTC, Tomas Zezula
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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