simplebench.timeout.thread_id module🔗
Thread ID type definition.
- class simplebench.timeout.thread_id.ThreadId(value: int)[source]🔗
Bases:
intThread ID Type definition.
This is a subclass of
intthat represents thread identifiers in Python.It behaves like a standard integer but is specifically used to denote thread IDs and checks for type safety when used in functions that require thread identifiers.
- Usage:
You can use this class to create thread ID objects that behave like integers.
`python tid = ThreadId(12345) print(tid) # Output: 12345 print(isinstance(tid, int)) # Output: True `
Create a new ThreadId instance after validating the value.