def subscribe_ticker(self, prod_code):
    self._ticker_queues.setdefault(prod_code, Queue())
    subscribe_ticker(prod_code, 1)
    t = self._resample_thread.setdefault(prod_code, Thread(target=self._resample_ticker, args=(prod_code,)))
    if (not t.isAlive()):
        t.setDaemon(True)
        t.start()
def subscribe_ticker(self, prod_code):
    self._ticker_queues.setdefault(prod_code, Queue())
    subscribe_ticker(prod_code, 1)
    t = self._resample_thread.setdefault(prod_code, Thread(target=self._resample_ticker, args=(prod_code,)))
    if (not t.isAlive()):
        t.setDaemon(True)
        t.start()