def getDelegateTorrentData(infoHash = nil)
      # Use an immediate, non-recurring timer.
      result = {}
      return result if stopped?
      semaphore = Semaphore.new
      timer = @reactor.scheduleTimer(0, [:get_torrent_data, result, semaphore, infoHash], false, true)
      if semaphore.wait(3)
        result
      else
        @logger.warn "getDelegateTorrentData: Waiting on semaphore timed out"
        throw "Waiting on semaphore for timer #{timer.object_id} timed out"
      end
    end
def getDelegateTorrentData(infoHash = nil)
      # Use an immediate, non-recurring timer.
      result = {}
      return result if stopped?
      semaphore = Semaphore.new
      timer = @reactor.scheduleTimer(0, [:get_torrent_data, result, semaphore, infoHash], false, true)
      if semaphore.wait(3)
        result
      else
        @logger.warn "getDelegateTorrentData: Waiting on semaphore timed out"
        throw "Waiting on semaphore for timer #{timer.object_id} timed out"
      end
    end
Get a hash of new TorrentDataDelegate objects keyed by torrent infohash.
 This method is meant to be called from a different thread than the one
 the reactor is running in. This method is not immediate but blocks until the
 data is prepared.
 If infoHash is passed, only that torrent data is returned (still in a hashtable; just one entry)