every go routine needs to have its own collection factory

this is needed so concurrent reads and writes are possible.
This commit is contained in:
Oliver Sauder
2016-11-18 15:46:49 +01:00
committed by Lorenzo Bolla
parent 4a6d53e16d
commit 208a2151c1
48 changed files with 305 additions and 387 deletions
+2 -2
View File
@@ -28,8 +28,8 @@ func aptlyGraph(cmd *commander.Command, args []string) error {
layout := context.Flags().Lookup("layout").Value.String()
fmt.Printf("Generating graph...\n")
graph, err := deb.BuildGraph(context.CollectionFactory(), layout)
collectionFactory := context.NewCollectionFactory()
graph, err := deb.BuildGraph(collectionFactory, layout)
if err != nil {
return err
}