How to obtain a Thread id in Python?

后端 未结 8 802
时光说笑
时光说笑 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:56

    I created multiple threads in Python, I printed the thread objects, and I printed the id using the ident variable. I see all the ids are same:

    
    
    
    

提交回复
热议问题