<span class=font-medium>3 minute</span></div></div><div class="flex flex-wrap items-center gap-1.5 mt-2"><span class="bg-muted/50 border-muted/30 flex items-center gap-1 rounded-md border px-2 py-1"><span class=font-medium>FastAPI</span></span></div></div></div></div></a></article><article class=group><a href=/posts/python-asyncio-02-asyncio-basics-part-2/ class=block><div class="bg-card border-border hover:bg-primary/5 hover:border-primary/20 focus:ring-primary/20 relative flex flex-col overflow-hidden rounded-xl border transition-all duration-300 ease-out hover:-translate-y-1 hover:scale-[1.02] hover:shadow-lg focus:ring-2 focus:outline-none min-h-[200px]"><div class="block md:hidden"><div class="aspect-[2/1] overflow-hidden"><div class="from-orange-500/20 to-red-500/10 relative aspect-[2/1] overflow-hidden bg-gradient-to-br" style="background-blend-mode:overlay;background-color:color-mix(in srgb,var(--color-primary) 15%,transparent)"><div class="absolute inset-0"><div class="absolute left-[20%] top-[20%] h-5 w-5 rotate-0 bg-white/80" style="clip-path:polygon(50% 0%,61% 35%,98% 35%,68% 57%,79% 91%,50% 70%,21% 91%,32% 57%,2% 35%,39% 35%)"></div><div class="absolute right-[25%] top-[25%] h-4 w-4 rotate-36 bg-white/70" style="clip-path:polygon(50% 0%,61% 35%,98% 35%,68% 57%,79% 91%,50% 70%,21% 91%,32% 57%,2% 35%,39% 35%)"></div><div class="absolute left-[30%] bottom-[30%] h-3 w-3 rotate-72 bg-white/60" style="clip-path:polygon(50% 0%,61% 35%,98% 35%,68% 57%,79% 91%,50% 70%,21% 91%,32% 57%,2% 35%,39% 35%)"></div><div class="absolute right-[20%] bottom-[20%] h-4 w-4 rotate-108 bg-white/65" style="clip-path:polygon(50% 0%,61% 35%,98% 35%,68% 57%,79% 91%,50% 70%,21% 91%,32% 57%,2% 35%,39% 35%)"></div><div class="absolute left-[45%] top-[45%] h-2 w-2 rotate-144 bg-white/50" style="clip-path:polygon(50% 0%,61% 35%,98% 35%,68% 57%,79% 91%,50% 70%,21% 91%,32% 57%,2% 35%,39% 35%)"></div><div class="absolute right-[35%] top-[35%] h-2 w-2 rounded-full bg-white/40"></div><div class="absolute left-[40%] bottom-[35%] h-1.5 w-1.5 rounded-full bg-white/35"></div><div class="absolute right-[45%] bottom-[45%] h-1 w-1 rounded-full bg-white/30"></div><div class="absolute top-[30%] left-[30%] h-0.5 w-6 rotate-30 bg-white/25"></div><div class="absolute bottom-[30%] right-[30%] h-0.5 w-4 -rotate-45 bg-white/20"></div></div></div></div></div><div class="absolute top-0 right-0 hidden h-full w-80 transition-opacity duration-300 group-hover:opacity-90 md:block"><div class="h-full w-full"><div class="from-orange-500/20 to-red-500/10 relative h-full w-full overflow-hidden bg-gradient-to-br" style="background-blend-mode:overlay;background-color:color-mix(in srgb,var(--color-primary) 15%,transparent)"><div class="absolute inset-0"><div class="absolute left-[20%] top-[20%] h-5 w-5 rotate-0 bg-white/80" style="clip-path:polygon(50% 0%,61% 35%,98% 35%,68% 57%,79% 91%,50% 70%,21% 91%,32% 57%,2% 35%,39% 35%)"></div><div class="absolute right-[25%] top-[25%] h-4 w-4 rotate-36 bg-white/70" style="clip-path:polygon(50% 0%,61% 35%,98% 35%,68% 57%,79% 91%,50% 70%,21% 91%,32% 57%,2% 35%,39% 35%)"></div><div class="absolute left-[30%] bottom-[30%] h-3 w-3 rotate-72 bg-white/60" style="clip-path:polygon(50% 0%,61% 35%,98% 35%,68% 57%,79% 91%,50% 70%,21% 91%,32% 57%,2% 35%,39% 35%)"></div><div class="absolute right-[20%] bottom-[20%] h-4 w-4 rotate-108 bg-white/65" style="clip-path:polygon(50% 0%,61% 35%,98% 35%,68% 57%,79% 91%,50% 70%,21% 91%,32% 57%,2% 35%,39% 35%)"></div><div class="absolute left-[45%] top-[45%] h-2 w-2 rotate-144 bg-white/50" style="clip-path:polygon(50% 0%,61% 35%,98% 35%,68% 57%,79% 91%,50% 70%,21% 91%,32% 57%,2% 35%,39% 35%)"></div><div class="absolute right-[35%] top-[35%] h-2 w-2 rounded-full bg-white/40"></div><div class="absolute left-[40%] bottom-[35%] h-1.5 w-1.5 rounded-full bg-white/35"></div><div class="absolute right-[45%] bottom-[45%] h-1 w-1 rounded-full bg-white/30"></div><div class="absolute top-[30%] left-[30%] h-0.5 w-6 rotate-30 bg-white/25"></div><div class="absolute bottom-[30%] right-[30%] h-0.5 w-4 -rotate-45 bg-white/20"></div></div></div></div></div><div class="absolute top-0 right-0 hidden h-full w-80 opacity-0 transition-opacity duration-300 group-hover:opacity-100 md:block bg-gradient-to-l from-primary/5"></div><div class="relative z-10 flex flex-1 flex-col p-6 md:pr-[21rem]"><h3 class="text-foreground group-hover:text-primary mb-4 text-lg font-semibold leading-tight transition-colors duration-200">Python Asyncio 02: Asyncio Basics Part 2</h3><p class="text-muted-foreground mb-4 text-sm leading-relaxed line-clamp-2">Tasks, coroutines, furtures, and awaitables Coroutines 和 tasks 都是 await 表达式,那他们的相同线程是哪个? 下面介绍 future 也被称作 awaitable,理解 futures 是理解 asyncio 内部工作的重点。
0 commit comments