def delete_thread(thread_uid):
pipe = content.pipeline()<EOL>pipe.delete(build_key(THREAD_KEY, thread_uid))<EOL>comments_key = build_key(THREAD_COMMENTS_KEY, thread_uid)<EOL>for comment_uid in links.lrange(comments_key, <NUM_LIT:0>, -<NUM_LIT:1>):<EOL><INDENT>pipe.delete(build_key(COMMENT_KEY, thread_uid, comment_uid))<EOL><DEDENT>pipe.execute()<EOL>with links.pipeline() as pipe:<EOL><INDENT>pipe.delete(comments_key)<EOL>pipe.delete(build_key(THREAD_COUNTER_KEY, thread_uid))<EOL>pipe.lrem(build_key(THREADS_KEY), <NUM_LIT:1>, thread_uid)<EOL>pipe.execute()<EOL><DEDENT>return True<EOL>
Delete thread and all its data from storages.

    :param thread_uid: Thread unique ID.