Re: Q. aboutMutableFileSet
Vitezslav Stejskal <[email protected]> Fri, 13 Jun 2003 10:28:38 +0200
| Newsgroups | gmane.comp.java.netbeans.modules.projects.devel |
|---|---|
| Message-ID | <[email protected]> |
Svata Dedic wrote:
> Svata Dedic wrote:
>
>> events during each operation. Without at least move(), it is not
>> feasible to reorder fileset's contents without outside world
>> observing the fileset in an inconsistent (== without all the
>> elements) content.
>>
> An afterthought, probably more useful:
> In Registry API, a lock over the structure is available for clients.
> If MutableFileSet allows its owner (who creates the instance) to lock
> the FileSets for the length of modification, supressing event flow, it
> may remove quite a few deadlocks: subsequent modifications are often
> done from synchronzied sections for data consistency reasons.
I think that supressing event flow during modifications should be
enough. At least it seems to be enough when working with FileSystems, e.g.:
FS.runAtomic {
synchronized(xyz) {
FS.modify_and_fire_events();
}
}
Events are fired when leaving the atomic action section which is already
outside the synchronization.
-vita