[gephi-dev] [Dynamics] Unable to get a graph snapshot after a read lock

Mathieu Bastian mathieu.bastian at gmail.com
Fri Dec 3 18:08:59 CET 2010


Locking is done on the whole model, not on the graph so when you copy it
enters a writeLock(). Remove your readLock and it should be fine.

On Fri, Dec 3, 2010 at 8:13 AM, Sébastien Heymann <
sebastien.heymann at gephi.org> wrote:

> Hi @dev,
>
> The following code rises a readLock exception:
>
> graph.readLock();
>> Graph g = dynamicGraph.getSnapshotGraph(low, high);
>>
> ...
>>
> graph.readUnlock();
>>
>
> This is a wrong behavior, as getSnapshotGraph() is intended to return a
> copy of the working graph.
>
> The issue is at DynamicGraphImpl.java line 246:
>
>> Graph vgraph = model.getGraph(currentView);
>>
>
> This copy, in which nodes outside the interval are removed, should be free
> of locks.
>
>
> Cheers,
> Seb
>
> _______________________________________________
> gephi-dev mailing list
> gephi-dev at lists.gephi.org
> http://gephi.org/mailman/listinfo/gephi-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://gephi.org/pipermail/gephi-dev/attachments/20101203/d7504657/attachment.html>


More information about the gephi-dev mailing list