Hi,
I need to load a Java data-base presented as java Collection. Basically it
is org.eclipse.rdf4j.sail.model.SailModel (
http://docs.rdf4j.org/javadoc/latest/org/eclipse/rdf4j/sail/model/SailModel.html).
Anyway the data are stored on the disk but the object is not thread safe.
In my program I creates threads which populate the model asynchronously.
each thread (pmap) follows pattern:
in the main defn
f-model ...... ;; final target
(defn [args ]
(let [tmp-model1 ...
tmp-model2 .....
.....]
(locking f-model
(.addAll f-model tmp-model1)
...
)))
But I do not think it is a good solution - I found my program stop working
shortly after building up the final model.
In my previous version threads return single tmp-models but that caused out
of memory easy. What else can I try?
Regads,
Jacek
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to [email protected]
Note that posts from new members are moderated - please be patient with your
first post.
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
---
You received this message because you are subscribed to the Google Groups
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.