Re: Q. aboutMutableFileSet
Svatopluk Dedic <[email protected]> Fri, 13 Jun 2003 10:33:53 +0200
| Newsgroups | gmane.comp.java.netbeans.modules.projects.devel |
|---|---|
| Message-ID | <[email protected]> |
Vitezslav Stejskal wrote:
> 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.
>
Please look at Mutex class and its evolution - first there were only
methods with Runnables - but because of its frequent use (and many inner
anonymous classes created), paired enter/exit methods were added later.
It's not so safe for the API caller, but it is more effective for IDE's
footprint (and execution time, too ;))
-Svata