How to obtain a Thread id in Python?

后端 未结 8 846
时光说笑
时光说笑 2020-12-02 08:01

I have a multi-threading Python program, and a utility function, writeLog(message), that writes out a timestamp followed by the message. Unfortunately, the resu

8条回答
  •  佛祖请我去吃肉
    2020-12-02 08:34

    This functionality is now supported by Python 3.8+ :)

    https://github.com/python/cpython/commit/4959c33d2555b89b494c678d99be81a65ee864b0

    https://github.com/python/cpython/pull/11993

提交回复
热议问题