MCPcopy Create free account
hub / github.com/bloomberg/pystack / get_thread_name

Function get_thread_name

src/pystack/process.py:135–140  ·  view source on GitHub ↗
(pid: int, tid: int)

Source from the content-addressed store, hash-verified

133
134
135def get_thread_name(pid: int, tid: int) -> Optional[str]:
136 try:
137 with open(f"/proc/{pid}/task/{tid}/comm") as comm:
138 return comm.read().strip()
139 except OSError:
140 return None
141
142
143def is_gzip(filename: pathlib.Path) -> bool:

Callers 1

Calls

no outgoing calls

Tested by 1