Commit 695ebf8c authored by Paul Asmuth's avatar Paul Asmuth
Browse files

make it threadsafe

parent 924158e1
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -17,7 +17,7 @@ trait AbstractBucket {
  def sample(value: Double) : Unit
  def flush() : Double

  def sample_and_flush(value: Double) = {
  def sample_and_flush(value: Double) = this.synchronized {
    val now = FnordMetric.now

    if (next_flush == 0)