I'm sure this is very straightforward but can someone enlighten me why
queue copy fetch is seemingly never called from within process-indexes
(the 'pre add' line is printed but the 'adding' debug line is never
printed). I've verified the correct contents of fetches-seq. For a
bonus point can I ask if need the dosync inside q-c-f if its only ever
called from p-i ?
Any comments on style appreciated too.
(defn- queue-copy-fetch [cfetch]
(println "adding " cfetch)
(dosync
(alter copy-fetch-queue conj cfetch)))
(defn process-indexes []
(while (seq @index-process-queue)
(let [an-index (qpop index-process-queue)
index-source (:source (:fetch an-index))
index-content (:doc-seq an-index)
links-seq ((:copy-link-selector index-source) index-content)
fetches-seq (map (partial fetch index-source) links-seq)]
(println "pre add")
(dosync (map queue-copy-fetch fetches-seq)))))
--
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