giraph-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jiadong Wu <jw...@gatech.edu>
Subject Is it necessary to lock partition access in ComputeCallable?
Date Tue, 26 Mar 2013 17:39:43 GMT
Hi Giraphers,

Just a small question. In ComputeCallable.computePartition, partition
access is locked with synchronized(partition) to "make sure this is
thread-safe across runs". I may not get the whole picture clearly, but
this lock looks redundant to me. If every thread polled its
partitionIds from a BlockingQueue, how could two threads work on the
same partition?

Thanks,

Mime
View raw message