Skip to content

Commit 1c475c9

Browse files
fix mermaid flowchart
1 parent b78c68b commit 1c475c9

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

InternalDocs/asyncio.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ When a task is created, it is added to the current thread's list of tasks by the
7373
created the task is stored in `task_tid` field of the `TaskObj`. This is used to check if the task is being removed from the correct thread's task list. If the current thread is same as the thread which created it then no locking is required, otherwise in free-threading, the `stop-the-world` pause is used to pause all other threads and then safely remove the task from the tasks list.
7474

7575
```mermaid
76+
7677
flowchart TD
7778
subgraph one["Executing Thread"]
7879
A["task = asyncio.create_task(coro())"] -->B("register_task(task)")
@@ -89,7 +90,7 @@ flowchart TD
8990
I --> H["unregister_task_safe(task)"]
9091
end
9192
subgraph two["Thread deallocating"]
92-
A1{"thread's task list empty? <br> llist_empty(tstate->asyncio_tasks_head)"}```
93+
A1{"thread's task list empty? <br> llist_empty(tstate->asyncio_tasks_head)"}
9394
A1 --> |true| B1["deallocate thread<br>free_threadstate(tstate)"]
9495
A1 --> |false| C1["add tasks to interpreter's task list<br> llist_concat(&tstate->interp->asyncio_tasks_head,tstate->asyncio_tasks_head)"]
9596
C1 --> B1

0 commit comments

Comments
 (0)