all repos — gemini-redirect @ 4aa1bff45e66c575d4a45405edfc4cc97f9bbcc5

blog/asyncio/eventloop.svg (view raw)

  1<?xml version="1.0" encoding="UTF-8" standalone="no"?>
  2<!-- Created with Inkscape (http://www.inkscape.org/) -->
  3
  4<svg
  5   xmlns:dc="http://purl.org/dc/elements/1.1/"
  6   xmlns:cc="http://creativecommons.org/ns#"
  7   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
  8   xmlns:svg="http://www.w3.org/2000/svg"
  9   xmlns="http://www.w3.org/2000/svg"
 10   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
 11   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
 12   width="640"
 13   height="480"
 14   viewBox="0 0 169.33333 127"
 15   version="1.1"
 16   id="svg8"
 17   inkscape:version="0.92.2 2405546, 2018-03-11"
 18   sodipodi:docname="eventloop.svg">
 19  <defs
 20     id="defs2">
 21    <marker
 22       inkscape:stockid="Arrow1Lend"
 23       orient="auto"
 24       refY="0.0"
 25       refX="0.0"
 26       id="Arrow1Lend"
 27       style="overflow:visible;"
 28       inkscape:isstock="true">
 29      <path
 30         id="path855"
 31         d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
 32         style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1;fill:#000000;fill-opacity:1"
 33         transform="scale(0.8) rotate(180) translate(12.5,0)" />
 34    </marker>
 35  </defs>
 36  <sodipodi:namedview
 37     id="base"
 38     pagecolor="#ffffff"
 39     bordercolor="#666666"
 40     borderopacity="1.0"
 41     inkscape:pageopacity="0.0"
 42     inkscape:pageshadow="2"
 43     inkscape:zoom="0.7"
 44     inkscape:cx="316.89692"
 45     inkscape:cy="221.88288"
 46     inkscape:document-units="mm"
 47     inkscape:current-layer="layer1"
 48     showgrid="false"
 49     units="px"
 50     inkscape:window-width="1366"
 51     inkscape:window-height="739"
 52     inkscape:window-x="0"
 53     inkscape:window-y="0"
 54     inkscape:window-maximized="1"
 55     showguides="true" />
 56  <metadata
 57     id="metadata5">
 58    <rdf:RDF>
 59      <cc:Work
 60         rdf:about="">
 61        <dc:format>image/svg+xml</dc:format>
 62        <dc:type
 63           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
 64        <dc:title />
 65      </cc:Work>
 66    </rdf:RDF>
 67  </metadata>
 68  <g
 69     inkscape:label="Layer 1"
 70     inkscape:groupmode="layer"
 71     id="layer1"
 72     transform="translate(0,-169.99995)">
 73    <rect
 74       style="opacity:1;fill:#ffffc3;fill-opacity:1;stroke:#000000;stroke-width:0.25628251;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
 75       id="rect834"
 76       width="163.12053"
 77       height="66.714058"
 78       x="3.1063988"
 79       y="172.44116" />
 80    <rect
 81       style="opacity:1;fill:none;fill-opacity:1;stroke:#000000;stroke-width:0.25628251;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
 82       id="rect836"
 83       width="72.491341"
 84       height="14.827774"
 85       x="5.7682643"
 86       y="176.38446" />
 87    <text
 88       xml:space="preserve"
 89       style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:10.25129986px;line-height:1.25;font-family:sans-serif;-inkscape-font-specification:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.25628251"
 90       x="12.724504"
 91       y="186.4527"
 92       id="text840"><tspan
 93         sodipodi:role="line"
 94         id="tspan838"
 95         x="12.724504"
 96         y="186.4527"
 97         style="stroke-width:0.25628251">event loop</tspan></text>
 98    <text
 99       xml:space="preserve"
100       style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:8.77740383px;line-height:1.25;font-family:sans-serif;-inkscape-font-specification:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.21943507"
101       x="18.673456"
102       y="204.51938"
103       id="text844"><tspan
104         sodipodi:role="line"
105         id="tspan842"
106         x="18.673456"
107         y="204.51938"
108         style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:monospace;-inkscape-font-specification:monospace;stroke-width:0.21943507">while running:</tspan><tspan
109         sodipodi:role="line"
110         x="18.673456"
111         y="215.49113"
112         style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:monospace;-inkscape-font-specification:monospace;stroke-width:0.21943507"
113         id="tspan846">    process events</tspan><tspan
114         sodipodi:role="line"
115         x="18.673456"
116         y="226.46289"
117         style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:monospace;-inkscape-font-specification:monospace;stroke-width:0.21943507"
118         id="tspan848">    call user_function()</tspan></text>
119    <path
120       style="fill:none;stroke:#000000;stroke-width:0.25628251px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1Lend)"
121       d="m 24.661439,211.12809 v 23.81738 H 150.99704 V 187.8285 H 86.793703 v 5.17769"
122       id="path850"
123       inkscape:connector-curvature="0" />
124    <rect
125       y="243.02905"
126       x="3.1063988"
127       height="51.462708"
128       width="163.12053"
129       id="rect1134"
130       style="opacity:1;fill:#daffff;fill-opacity:1;stroke:#000000;stroke-width:0.25004876;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
131    <rect
132       y="248.85146"
133       x="5.7682643"
134       height="14.827774"
135       width="72.491341"
136       id="rect1136"
137       style="opacity:1;fill:none;fill-opacity:1;stroke:#000000;stroke-width:0.25628251;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
138    <text
139       id="text1140"
140       y="258.91971"
141       x="12.724504"
142       style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:10.25129986px;line-height:1.25;font-family:sans-serif;-inkscape-font-specification:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.25628251"
143       xml:space="preserve"><tspan
144         style="stroke-width:0.25628251"
145         y="258.91971"
146         x="12.724504"
147         id="tspan1138"
148         sodipodi:role="line">your code</tspan></text>
149    <text
150       id="text1148"
151       y="275.38342"
152       x="14.646159"
153       style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:8.77740383px;line-height:1.25;font-family:sans-serif;-inkscape-font-specification:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.21943507"
154       xml:space="preserve"><tspan
155         id="tspan1146"
156         style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:monospace;-inkscape-font-specification:monospace;stroke-width:0.21943507"
157         y="275.38342"
158         x="14.646159"
159         sodipodi:role="line">async def user_function():</tspan><tspan
160         style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:monospace;-inkscape-font-specification:monospace;stroke-width:0.21943507"
161         y="286.35516"
162         x="14.646159"
163         sodipodi:role="line"
164         id="tspan1155">    ...  # some code</tspan></text>
165  </g>
166</svg>