版本3和4间的区别
于2010-01-04 21:52:05修订的的版本3
大小: 1604
编辑: 116
备注:
于2010-01-04 21:54:31修订的的版本4
大小: 1737
编辑: 116
备注:
删除的内容标记成这样。 加入的内容标记成这样。
行号 32: 行号 32:

=== 你需要知道的 ===
==== 阻塞的操作 ====
==== 异常 ====
==== 调试 ====
=== 外部资源 ===

=== 历史 ===

英文原版: http://www.disinterest.org/resource/stackless/2.6.4-docs-html/stackless-python.html

Stackless Python

Stackless Python 是Python语言的一个增强版本。它让程序员可以获得基于线程的程序的优点,同时又避免传统线程带来的性能和复杂度问题。Stackless Python为Python语言添加的微线程(microthread)是一种方便、廉价、轻量级的工具,如果使用得当,它不仅可以提供一种构建应用程序或者框架的方法,而且能改进程序的结构和可读性。

如果你在你安装的Python附带的文档中读到这篇文章,这说明你安装的已经是Stackless Python而非标准的Python。

1. 概述

除了Stackless Python新增的功能部分,Stackless Python的其他部分的行为和标准的Python完全一样,用法也完全一样。Stackless的新增的功能,是通过stackless模块暴露出来的框架来使用的。

  • stackless — The built-in extension module
    • Tasklets — Lightweight threads
      • Tasklets, main, current and more
      • The tasklet class
    • Channels — Communication between tasklets
      • Channels and threads
      • The channel class
    • The scheduler — How tasklets are run
      • Cooperative scheduling
      • Pre-emptive scheduling
      • Exceptions
    • Debugging and Tracing — How Stackless differs
      • settrace and tasklets
    • Threads — Threads and Stackless
      • A scheduler per thread
      • Channels are thread-safe
    • Pickling — Serialisation of running tasklets
    • Functions
    • Attributes
    • Exceptions

2. 你需要知道的

2.1. 阻塞的操作

2.2. 异常

2.3. 调试

3. 外部资源

4. 历史

StacklessPython (2010-01-24 11:31:07由125编辑)

ch3n2k.com | Copyright (c) 2004-2020 czk.