MCPcopy Create free account
hub / github.com/benfred/py-spy / ThreadState

Interface ThreadState

src/python_interpreters.rs:34–48  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

32}
33
34pub trait ThreadState: Copy {
35 type FrameObject: FrameObject;
36 type InterpreterState: InterpreterState;
37
38 fn interp(&self) -> *mut Self::InterpreterState;
39
40 // starting in python 3.11, there is an extra level of indirection
41 // in getting the frame. this returns the address
42 fn frame_address(&self) -> Option<usize>;
43
44 fn frame(&self, offset: Option<usize>) -> *mut Self::FrameObject;
45 fn thread_id(&self) -> u64;
46 fn native_thread_id(&self) -> Option<u64>;
47 fn next(&self) -> *mut Self;
48}
49
50pub trait FrameObject: Copy {
51 type CodeObject: CodeObject;

Callers

nothing calls this directly

Implementers 1

python_interpreters.rssrc/python_interpreters.rs

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…