1 Star 0 Fork 0

jimmylees / DataCollectionServer

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
utils.py 504 Bytes
一键复制 编辑 原始数据 按行查看 历史
jimmylees 提交于 2020-10-23 23:30 . 2020-10-23 23:30
import threading
import traceback
import logging
_logger = logging.getLogger(__name__)
def print_threading_info():
""" 打印当前线程信息,帮助观察 多线程环境 """
threadId = threading.current_thread()
main_threadId = threading.main_thread()
caller = traceback.extract_stack()
module = caller[-2][0]
caller = caller[-2][2]
_logger.debug(
"***** %s, %s : main_threadId:%s, threadId: %s *****" % (module, caller, main_threadId.ident, threadId.ident))
Python
1
https://gitee.com/jimmylees/DataCollectionServer.git
git@gitee.com:jimmylees/DataCollectionServer.git
jimmylees
DataCollectionServer
DataCollectionServer
master

搜索帮助

53164aa7 5694891 3bd8fe86 5694891