Use the workflow tid to capture the workflow thread's frame at the time of deadlock.
Added current_thread_id: Optional[int] and get_worker_ident(self) -> Optional[int] to interfaces/implementations.
Currently I only set tid in _run_once for the standard implementation, if it's needed elsewhere please let me know. (This is mainly why it's marked as a draft)
Also, readability around the code in _workflow.py is (imo) suboptimal so I'd appreciate feedback/ideas on that.
needs at least a cleanup before we pull but I do want to make sure the tid is set where it needs to be set, and secondarily if there are ways to make building the traceback easier/more readable.
Use the workflow tid to capture the workflow thread's frame at the time of deadlock.
Added
current_thread_id: Optional[int]
andget_worker_ident(self) -> Optional[int]
to interfaces/implementations.Currently I only set tid in
_run_once
for the standard implementation, if it's needed elsewhere please let me know. (This is mainly why it's marked as a draft)Also, readability around the code in
_workflow.py
is (imo) suboptimal so I'd appreciate feedback/ideas on that.