# File lib/nxt.rb, line 162
  def sensor(id, proc)
        id = id.to_i
        
        @sensor_threads[id].join if (@sensor_threads[id] and @sensor_threads[id].alive?)
        
        t = Thread.new(@sensors[id]) do |m|
                proc.call(m)
        end
        
        # FIXME: this blocks until we get something back from the sensor... probably 
        #        not the smartest way to do this
        t.join
        
        # FIXME: do we need to store the thread? it will always be dead by this point..
        @sensor_threads[id] = t
  end