<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Coroutine on PHPHA</title><link>https://blog.phpha.com/tag/coroutine/</link><description>Recent content in Coroutine on PHPHA</description><generator>Hugo</generator><language>zh</language><lastBuildDate>Sun, 21 Jan 2018 00:00:00 +0000</lastBuildDate><atom:link href="https://blog.phpha.com/tag/coroutine/index.xml" rel="self" type="application/rss+xml"/><item><title>PHP 与协程</title><link>https://blog.phpha.com/archives/120/</link><pubDate>Sun, 21 Jan 2018 00:00:00 +0000</pubDate><guid>https://blog.phpha.com/archives/120/</guid><description>&lt;p&gt;“协程”（Coroutine）概念最早由 Melvin Conway 于1958年提出。协程可以理解为纯用户态的线程，其通过协作而不是抢占来进行切换。相对于进程或者线程，协程所有的操作都可以在用户态完成，创建和切换的消耗更低。总的来说，协程为协同任务提供了一种运行时抽象，这种抽象非常适合于协同多任务调度和数据流处理。在现代操作系统和编程语言中，因为用户态线程切换代价比内核态线程小，协程成为了一种轻量级的多任务模型。&lt;/p&gt;</description></item></channel></rss>