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

2 views
Skip to first unread message

Mathieu Bastian

unread,
Oct 4, 2015, 11:15:51 AM10/4/15
to geph...@lists.gephi.org
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 <sebastie...@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
geph...@lists.gephi.org
http://gephi.org/mailman/listinfo/gephi-dev


Sébastien Heymann

unread,
Oct 4, 2015, 11:15:51 AM10/4/15
to geph...@lists.gephi.org
Reply all
Reply to author
Forward
0 new messages