The plan is to run it in a thread, yeah. The process-fn I'm planning on
running it with does some stuff to the tweet and then uploads the results
to a local couchdb instance. I've been periodically checking
/var/log/couchdb/couch.log to verify it's actually doing stuff.
I *think* this could ben
Your loop pattern should work. (I've used this pattern before.)
Just a sanity check: you *are* running this function in a different thread,
right? Because whatever thread calls this function *will* block forever,
whether the queue is empty or not. And unless you provide some
side-effecting proc
Your loop seems to work as expected:
user=> (def in-queue (java.util.concurrent.LinkedBlockingQueue. (range 1
11)))
#'user/in-queue
user=> (future (loop [res (.take in-queue)] (prn res) (recur (.take
in-queue
#1
2
3
4
5
6
7
8
9
10
user=> (.put in-queue 11)
nil11
user=>
What happens when you
I'm using Twitter's HBC library to read from Twitter's public stream. HBC
stores results in a LinkedBlockingQueue, from which you can then `.take`
tweets and do stuff to them (in my case, doing some
processing/normalization, then storing them in CouchDB). I've been
struggling with how exactly b