GraphStream Users

Archives de la liste Aide


Avoid concurrency issues when setting node attributes


Chronologique Discussions 
  • From: daniele visaggio <visaggio.daniele AT gmail.com>
  • To: graphstream-users AT litislab.fr
  • Subject: Avoid concurrency issues when setting node attributes
  • Date: Sun, 13 Jan 2013 12:52:05 +0100

Hi list,

I need to set nodes' attributes from a number of concurring threads.

Each thread owns a node object. Node objects are chosen by each thread at random from a LinkedBlockingQueue. No more than one thread can choose the same node, since we delete an already chosen node from LinkedBlockingQueue in an atomic way.

Now I need to perform a node.setAttribute() from each thread.

Is this a thread-safe operation in your opinion? or do I need to synchronize each setAttribute() in some way?

Thank you in advance,

Best Regards - Daniele



Archives gérées par MHonArc 2.6.16.

Top of page