finagle / finagle-zookeeper

Native non-blocking client for ZooKeeper with Finagle
Apache License 2.0
55 stars 10 forks source link

ZkTransport isn't threadsafe #35

Closed evnm closed 10 years ago

evnm commented 10 years ago

I think you'll want to accumulate a result in read rather than use a shared buf var.

evnm commented 10 years ago

Ah, I see. Thought that it was simply aggregating multiple calls to read, but now I see what buf = buf.slice(len, buf.length) is doing. I think the simpler option of just using synchronized is preferable, rather than introducing even more complexity with a queue.