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 191316 - Make idleIO an API
Summary: Make idleIO an API
Status: NEW
Alias: None
Product: platform
Classification: Unclassified
Component: Filesystems (show other bugs)
Version: 7.0
Hardware: PC Mac OS X
: P2 normal (vote)
Assignee: Tomas Zezula
Depends on:
Blocks: 191605 186744
  Show dependency tree
Reported: 2010-10-25 15:55 UTC by Tomas Zezula
Modified: 2010-12-06 12:47 UTC (History)
1 user (show)

See Also:
Exception Reporter:


Note You need to log in before you can comment on or make changes to this bug.
Description Tomas Zezula 2010-10-25 15:55:52 UTC
I am submitting this bug as Jarda wanted me to do it in issue #186744. Making P2 as the blocked issue is P2 as well.
I would prefer more closure like method, something like:
idleIO (Collection<? extends File> onFiles, Operation<File> closure). But feel free to implement it as you want.
Comment 1 Jaroslav Tulach 2010-11-25 09:44:02 UTC
Don't you rather want to have such method in parsing.api? It might cooperate in better way with other parsing tasks and parsing.api is already friend of masterfs, so it can use its existing idleIO.
Comment 2 Tomas Zezula 2010-11-25 15:11:08 UTC
It used to be an enhancement not issue. Sorry Jardo.
Comment 3 Jaroslav Tulach 2010-11-26 10:35:12 UTC
There is one reason why I don't want to make this standard API: Last release, when we started to use masterfs's idleIO, we run into few "deadlocks". Inside idleIO any I/O operation can take ages and as such any code can run really long. If that code holds any locks, other threads waiting for them get blocked as well.

We handled the mastefs.idleIO and slowRefresh problems as we could control both codes and gurantee that slowRefresh is lock-free. I think you can guarantee that for your usecase as well (thus I suggested to use the friend dependency with mastefs). But opening the API to public sounds too dangerous...
Comment 4 Tomas Zezula 2010-11-26 11:19:58 UTC
I will try, but I will need some help to find out what I should call in the master fs.
I will look in on Monday.
Comment 5 Jaroslav Tulach 2010-12-06 12:47:16 UTC
The right call is FileChangedManager.idleIO if it works for you, let me know and we'll move to someone into one of masterfs's friend packages (for now just make the FileChangedManager accessible).