Author: toad
Date: 2009-01-24 20:02:06 +0000 (Sat, 24 Jan 2009)
New Revision: 25291

Modified:
   branches/db4o/freenet/src/freenet/support/io/SegmentedBucketChainBucket.java
Log:
Maybe a synchronization problem.


Modified: 
branches/db4o/freenet/src/freenet/support/io/SegmentedBucketChainBucket.java
===================================================================
--- 
branches/db4o/freenet/src/freenet/support/io/SegmentedBucketChainBucket.java    
    2009-01-24 19:51:48 UTC (rev 25290)
+++ 
branches/db4o/freenet/src/freenet/support/io/SegmentedBucketChainBucket.java    
    2009-01-24 20:02:06 UTC (rev 25291)
@@ -35,7 +35,7 @@
  * 
  * @author Matthew Toseland <[email protected]> (0xE43DA450)
  */
-public class SegmentedBucketChainBucket implements Bucket {
+public class SegmentedBucketChainBucket implements NotPersistentBucket {
 
        private final ArrayList<SegmentedChainBucketSegment> segments;
        private boolean readOnly;
@@ -177,12 +177,16 @@
 
                        public void run(ObjectContainer container, 
ClientContext context) {
                                container.activate(seg, 1);
-                               baw.buckets = seg.shallowCopyBuckets();
+                               synchronized(baw) {
+                                       baw.buckets = seg.shallowCopyBuckets();
+                               }
                                container.deactivate(seg, 1);
                        }
                        
                }, NativeThread.HIGH_PRIORITY);
-               return baw.buckets;
+               synchronized(baw) {
+                       return baw.buckets;
+               }
        }
 
        public String getName() {

_______________________________________________
cvs mailing list
[email protected]
http://emu.freenetproject.org/cgi-bin/mailman/listinfo/cvs

Reply via email to