-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy paththread_pool.drawio
119 lines (119 loc) · 9.9 KB
/
thread_pool.drawio
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
<mxfile host="app.diagrams.net" modified="2024-07-04T11:20:08.404Z" agent="Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36 Edg/126.0.0.0" etag="spxXlA_-gTHqdCzubZQ8" version="24.6.4" type="github">
<diagram name="第 1 页" id="hi9ax4sM-fP_jrTkE1y_">
<mxGraphModel dx="1426" dy="755" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="1169" pageHeight="827" math="0" shadow="0">
<root>
<mxCell id="0" />
<mxCell id="1" parent="0" />
<mxCell id="mLPoJTd18JhxrVne2OP_-1" value="Thread pool" style="swimlane;" vertex="1" parent="1">
<mxGeometry x="160" y="215" width="200" height="150" as="geometry" />
</mxCell>
<mxCell id="mLPoJTd18JhxrVne2OP_-2" value="std::thread" style="whiteSpace=wrap;html=1;align=center;" vertex="1" parent="mLPoJTd18JhxrVne2OP_-1">
<mxGeometry x="10" y="100" width="80" height="30" as="geometry" />
</mxCell>
<mxCell id="mLPoJTd18JhxrVne2OP_-3" value="std::thread" style="whiteSpace=wrap;html=1;align=center;" vertex="1" parent="mLPoJTd18JhxrVne2OP_-1">
<mxGeometry x="110" y="100" width="80" height="30" as="geometry" />
</mxCell>
<mxCell id="mLPoJTd18JhxrVne2OP_-6" style="edgeStyle=orthogonalEdgeStyle;curved=1;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" edge="1" parent="mLPoJTd18JhxrVne2OP_-1" source="mLPoJTd18JhxrVne2OP_-8" target="mLPoJTd18JhxrVne2OP_-2">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="100" y="80" />
<mxPoint x="50" y="80" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="mLPoJTd18JhxrVne2OP_-7" style="edgeStyle=orthogonalEdgeStyle;curved=1;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;" edge="1" parent="mLPoJTd18JhxrVne2OP_-1" source="mLPoJTd18JhxrVne2OP_-8" target="mLPoJTd18JhxrVne2OP_-3">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="100" y="80" />
<mxPoint x="150" y="80" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="mLPoJTd18JhxrVne2OP_-8" value="TaskQueue" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="mLPoJTd18JhxrVne2OP_-1">
<mxGeometry x="40" y="40" width="120" height="30" as="geometry" />
</mxCell>
<mxCell id="mLPoJTd18JhxrVne2OP_-9" style="edgeStyle=orthogonalEdgeStyle;curved=1;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;" edge="1" parent="mLPoJTd18JhxrVne2OP_-1" source="mLPoJTd18JhxrVne2OP_-3" target="mLPoJTd18JhxrVne2OP_-3">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="mLPoJTd18JhxrVne2OP_-10" value="Serial queue" style="swimlane;startSize=23;" vertex="1" parent="1">
<mxGeometry x="440" y="120" width="200" height="260" as="geometry" />
</mxCell>
<mxCell id="mLPoJTd18JhxrVne2OP_-11" value="Task" style="swimlane;fontStyle=1;childLayout=stackLayout;horizontal=1;startSize=20;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;" vertex="1" parent="mLPoJTd18JhxrVne2OP_-10">
<mxGeometry x="20" y="30" width="160" height="100" as="geometry" />
</mxCell>
<mxCell id="mLPoJTd18JhxrVne2OP_-12" value="void operator()() {
 task();
 parent->CompleteTask();
}" style="text;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;spacingLeft=4;spacingRight=4;overflow=hidden;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;rotatable=0;" vertex="1" parent="mLPoJTd18JhxrVne2OP_-11">
<mxGeometry y="20" width="160" height="60" as="geometry" />
</mxCell>
<mxCell id="mLPoJTd18JhxrVne2OP_-13" value="Strand *parent" style="text;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;spacingLeft=4;spacingRight=4;overflow=hidden;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;rotatable=0;" vertex="1" parent="mLPoJTd18JhxrVne2OP_-11">
<mxGeometry y="80" width="160" height="20" as="geometry" />
</mxCell>
<mxCell id="mLPoJTd18JhxrVne2OP_-14" value="" style="group" vertex="1" connectable="0" parent="mLPoJTd18JhxrVne2OP_-10">
<mxGeometry x="20" y="140" width="160" height="40" as="geometry" />
</mxCell>
<mxCell id="mLPoJTd18JhxrVne2OP_-15" value="TaskQueue" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="mLPoJTd18JhxrVne2OP_-14">
<mxGeometry width="160" height="20" as="geometry" />
</mxCell>
<mxCell id="mLPoJTd18JhxrVne2OP_-16" value="Task" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="mLPoJTd18JhxrVne2OP_-14">
<mxGeometry y="20" width="40" height="20" as="geometry" />
</mxCell>
<mxCell id="mLPoJTd18JhxrVne2OP_-17" value="Task" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="mLPoJTd18JhxrVne2OP_-14">
<mxGeometry x="40" y="20" width="40" height="20" as="geometry" />
</mxCell>
<mxCell id="mLPoJTd18JhxrVne2OP_-18" value="Task" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="mLPoJTd18JhxrVne2OP_-14">
<mxGeometry x="80" y="20" width="40" height="20" as="geometry" />
</mxCell>
<mxCell id="mLPoJTd18JhxrVne2OP_-19" value="..." style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="mLPoJTd18JhxrVne2OP_-14">
<mxGeometry x="120" y="20" width="40" height="20" as="geometry" />
</mxCell>
<mxCell id="mLPoJTd18JhxrVne2OP_-20" value="ThreadPool &amp;thread_pool;" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;" vertex="1" parent="mLPoJTd18JhxrVne2OP_-10">
<mxGeometry x="20" y="190" width="150" height="20" as="geometry" />
</mxCell>
<mxCell id="mLPoJTd18JhxrVne2OP_-21" value="void CompleteTask();" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;" vertex="1" parent="mLPoJTd18JhxrVne2OP_-10">
<mxGeometry x="20" y="210" width="140" height="20" as="geometry" />
</mxCell>
<mxCell id="mLPoJTd18JhxrVne2OP_-33" value="bool task_inflight;" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;" vertex="1" parent="mLPoJTd18JhxrVne2OP_-10">
<mxGeometry x="20" y="230" width="140" height="20" as="geometry" />
</mxCell>
<mxCell id="mLPoJTd18JhxrVne2OP_-34" value="Serial queue" style="swimlane;startSize=23;" vertex="1" parent="1">
<mxGeometry x="440" y="390" width="200" height="80" as="geometry" />
</mxCell>
<mxCell id="mLPoJTd18JhxrVne2OP_-38" value="" style="group" vertex="1" connectable="0" parent="mLPoJTd18JhxrVne2OP_-34">
<mxGeometry x="20" y="30" width="160" height="40" as="geometry" />
</mxCell>
<mxCell id="mLPoJTd18JhxrVne2OP_-39" value="TaskQueue" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="mLPoJTd18JhxrVne2OP_-38">
<mxGeometry width="160" height="20" as="geometry" />
</mxCell>
<mxCell id="mLPoJTd18JhxrVne2OP_-40" value="Task" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="mLPoJTd18JhxrVne2OP_-38">
<mxGeometry y="20" width="40" height="20" as="geometry" />
</mxCell>
<mxCell id="mLPoJTd18JhxrVne2OP_-41" value="Task" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="mLPoJTd18JhxrVne2OP_-38">
<mxGeometry x="40" y="20" width="40" height="20" as="geometry" />
</mxCell>
<mxCell id="mLPoJTd18JhxrVne2OP_-42" value="Task" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="mLPoJTd18JhxrVne2OP_-38">
<mxGeometry x="80" y="20" width="40" height="20" as="geometry" />
</mxCell>
<mxCell id="mLPoJTd18JhxrVne2OP_-43" value="..." style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="mLPoJTd18JhxrVne2OP_-38">
<mxGeometry x="120" y="20" width="40" height="20" as="geometry" />
</mxCell>
<mxCell id="mLPoJTd18JhxrVne2OP_-47" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=1;entryY=0.5;entryDx=0;entryDy=0;curved=1;" edge="1" parent="1" source="mLPoJTd18JhxrVne2OP_-39" target="mLPoJTd18JhxrVne2OP_-8">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="mLPoJTd18JhxrVne2OP_-48" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=1;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="mLPoJTd18JhxrVne2OP_-15" target="mLPoJTd18JhxrVne2OP_-8">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="mLPoJTd18JhxrVne2OP_-54" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" edge="1" parent="1" source="mLPoJTd18JhxrVne2OP_-52" target="mLPoJTd18JhxrVne2OP_-15">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="mLPoJTd18JhxrVne2OP_-52" value="Callable" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
<mxGeometry x="720" y="255" width="90" height="30" as="geometry" />
</mxCell>
<mxCell id="mLPoJTd18JhxrVne2OP_-57" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=1;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="mLPoJTd18JhxrVne2OP_-53" target="mLPoJTd18JhxrVne2OP_-39">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="mLPoJTd18JhxrVne2OP_-53" value="Callable" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
<mxGeometry x="720" y="415" width="90" height="30" as="geometry" />
</mxCell>
</root>
</mxGraphModel>
</diagram>
</mxfile>