quipo / statsd

Golang StatsD client
MIT License
164 stars 51 forks source link

Concurrency usage of client returned by NewStatsdBuffer #42

Closed vishal24tuniki closed 7 years ago

vishal24tuniki commented 7 years ago

@quipo Can StatsdBuffer be used concurrently. Like in a production scenario if we create one instance of StatsdBuffer and use it across the code till the program exists, is it fine?

Igorshp commented 7 years ago

I'm also curious about this.

Moving from default to buffered client introduced data races for us. @quipo any advice on the usage of the buffered client?

quipo commented 7 years ago

I always instantiate a new buffered client from within each goroutine. Unfortunately the collector isn't thread safe.