GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — note/note/python/coroutine.md at master · trialbox/note

Expand file tree

/

coroutine.md

Copy path
More file actions
More file actions

Latest commit

 

History

History
History
7 lines (3 loc) · 491 Bytes
/

coroutine.md

Copy path

File metadata and controls

7 lines (3 loc) · 491 Bytes
Raw
Copy raw file
Download raw file
Edit and raw actions

协程不同于线程,线程是抢占式的调度,而协程是协同是的调度,协程需要自己做调度。

协程没有线程的安全问题,一个进程可以同时存在多个协程,但是只有一个协程是激活的,而且协程的激活和休眠又程序员通过编程来控制,而不是操作系统控制的,

协程氏用户空间线程,操作系统其存在一无所知,所以需要用户自己去调度,用来执行协程多任务非常合适。

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.