def _is_running_from_main_thread():
 return tornado.ioloop.IOLoop.current(instance=False)

def _is_running_from_main_thread ( ) : return tornado . ioloop . IOLoop . current ( instance = False )
return true if were the same thread as the one that created the tornado ioloop .