def METHOD_NAME(self, backtrace=False):
    cur_td = Thread.from_current()
    table = TextTable(types='itttiti', align='rrrrrlr')
    table.header(['Id', 'Name', 'State', 'Flags', 'Priority',
                  'Waiting Point', '# of ctx switches'])
    for td in Thread.list_all():
        marker = '(*) ' if cur_td.td_tid == td.td_tid else ''
        table.add_row(['{}{}'.format(marker, td.td_tid), td.td_name,
                       td.td_state, td.td_flags, td.td_prio, td.td_waitpt,
                       td.td_nctxsw])
    print('(*) current thread marker')
    print(table)
    if backtrace:
        for td in Thread.list_all():
            state = str(td.td_state)
            if state not in ['TDS_INACTIVE', 'TDS_RUNNING', 'TDS_DEAD']:
                self.dump_backtrace(td)