Re: Re: threading of FileSet
Vitezslav Stejskal <[email protected]> Mon, 23 Jun 2003 12:20:37 +0200
| Newsgroups | gmane.comp.java.netbeans.modules.projects.devel |
|---|---|
| Message-ID | <[email protected]> |
Svata Dedic wrote: > Jesse Glick wrote: > >> Svatopluk Dedic wrote: >> >> Re. passing a Mutex to the FileSet constructor - perhaps keep it >> simple, and just define one public static final Mutex MUTEX to be >> used with *any* fileset. Simple and should work. You can just fire >> changes > > > OK - my use case was to postpone events fired from several tightly > coupled filesets. Blocking events from all FileSets includes this > scenario naturally. Oh, I am sorry if I misunderstood you Svata, but I thing your original requirement was to postpone events firing when you are in the sync. section holding your internal lock used for syncing your internal structures. This is generic problem not tied to FileSets. Any class which fires events should allow to postpone events firing per clients request otherwise clients must not touch mutators of this class when holding some lock. I am sorry, but I don't see how single global FileSet's Mutex can help with this. Or do you mean that every client using FileSets API should also use this mutex to synchronize its internal structures? IMO this isn't doable in every situation. This solution would lead to one super Mutex used everywhere in the Netbeans or (which seems better alternative to me) to make Netbeans singlethreaded. -vita