From: John M <joh...@gm...> - 2015-10-23 09:21:32
|
Since the SDG currently has state the only way I can see would be synchronisation which doesn't solve the problem (only one molecule is laid out at once) or an API change. Here's the current flow *SDG sdg = new SDG();* *sdg.setMolecule(mol); // cloned by default* *sdg.generate(); * *mol = sdg.getMolecule();* IMO Best way to make something thread safe is immutability and a single entry/exit point, hence. *SDG sdg = new **SDG();* *sdg.generate(mol);* The *Layout* suggestion is for the interface. J |