Commit d15fe115 authored by Paul Asmuth's avatar Paul Asmuth
Browse files

renamed background thread to scheduler

parent 7bf18cbf
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -102,8 +102,8 @@ object FnordMetric {
    if (flock == null)
      error("cannot aquire server.lck", true)

    val bg_thread = new BackgroundThread
    bg_thread.start
    val sched = new Scheduler
    sched.start

    if (CONFIG contains 'http)
      error("FIXPAUL: not yet implemented: http-server", true)
+7 −7
Original line number Diff line number Diff line
@@ -7,16 +7,16 @@

package com.fnordmetric.enterprise

class BackgroundThread extends Thread {
class Scheduler extends Thread {

  val TICK = 10

  // this runs in the background and tries to invoke some flushes in
  // the background. it is not neccessary for the liveliness of the
  // application that each iteration of the loop finishes in a fixed
  // time interval. even if this thread dies completely all data will
  // be correctly recorded, but the last sample on each metric won't
  // be flushed until new data arrives
  // this runs in the background and tries to invoke some flushes. it
  // is not neccessary for the liveliness of the application that each
  // iteration of the loop finishes in a fixed time interval. even if
  // this thread dies completely all data will be correctly recorded,
  // only the last sample on each metric won't be flushed until new data
  // arrives
  override def run : Unit =
    while (true) next