|
View:
New views
4 Messages
—
Rating Filter:
Alert me
|
|
|
Need lock while building pipeline?Hi guys,
I'm getting this exception while buildind a GL pipeline. I think the problem is related to a lack of lock, because I think the list is being populated (with the apropriate writeLock) while the pipeline is being constructed. Do I need to acquire a lock in this situation? Read or write? java.lang.NullPointerException at ca.odell.glazedlists.impl.adt.barcode2.SimpleTree.get(SimpleTree.java:151) at ca.odell.glazedlists.SortedList.getSourceIndex(SortedList.java:372) at ca.odell.glazedlists.TransformedList.get(TransformedList.java:103) at ca.odell.glazedlists.impl.Grouper.groupTogether(Grouper.java:282) at ca.odell.glazedlists.impl.Grouper.setComparator(Grouper.java:79) at ca.odell.glazedlists.impl.Grouper.<init>(Grouper.java:64) at ca.odell.glazedlists.UniqueList.<init>(UniqueList.java:93) at ca.odell.glazedlists.UniqueList.<init>(UniqueList.java:67) at br.com.investtools.trader.ui.filter.transaction.TransactionBrokerFilter.<init>(TransactionBrokerFilter.java:77) Thanks, Danilo --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@... For additional commands, e-mail: users-help@... |
|
|
re: Need lock while building pipeline?Yup - if you are adding an 'active' list to a new pipeline, then you need to honor locking semantecs. During list setup, the calls should be read-only (there may be exceptions to this, but I can't think of any). So grab a read lock on the list that you are building the pipeline against, build the pipeline, then drop the lock.
The write lock will block the read lock (or vice-versa) and you should be in business. - K ----------------------- Original Message ----------------------- From: "Danilo Tuler" <tuler@...> To: users@... Cc: Date: Thu, 29 May 2008 20:12:31 -0300 Subject: Need lock while building pipeline? Hi guys, I'm getting this exception while buildind a GL pipeline. I think the problem is related to a lack of lock, because I think the list is being populated (with the apropriate writeLock) while the pipeline is being constructed. Do I need to acquire a lock in this situation? Read or write? java.lang.NullPointerException at ca.odell.glazedlists.impl.adt.barcode2.SimpleTree.get(SimpleTree.java:151) at ca.odell.glazedlists.SortedList.getSourceIndex(SortedList.java:372) at ca.odell.glazedlists.TransformedList.get(TransformedList.java:103) at ca.odell.glazedlists.impl.Grouper.groupTogether(Grouper.java:282) at ca.odell.glazedlists.impl.Grouper.setComparator(Grouper.java:79) at ca.odell.glazedlists.impl.Grouper.<init>(Grouper.java:64) at ca.odell.glazedlists.UniqueList.<init>(UniqueList.java:93) at ca.odell.glazedlists.UniqueList.<init>(UniqueList.java:67) at br.com.investtools.trader.ui.filter.transaction.TransactionBrokerFilter.<init>(TransactionBrokerFilter.java:77) Thanks, Danilo --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@... For additional commands, e-mail: users-help@... --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@... For additional commands, e-mail: users-help@... |
|
|
Re: Need lock while building pipeline?Kevin is correct, a read-lock is the correct lock to obtain.
Nice catch, by the way. Locking during pipeline construction is typically a problem people overlook and can't explain... James
On Thu, May 29, 2008 at 8:23 PM, Kevin Day <kevin@...> wrote: Yup - if you are adding an 'active' list to a new pipeline, then you need to honor locking semantecs. During list setup, the calls should be read-only (there may be exceptions to this, but I can't think of any). So grab a read lock on the list that you are building the pipeline against, build the pipeline, then drop the lock. |
|
|
RE: Need lock while building pipeline?
It’s easy to add contacts from Facebook and other social sites through Windows Live™ Messenger. Learn How. |
| Free Forum Powered by Nabble | Forum Help |