More sophisticated use of sphinx.

This commit is contained in:
Ryan Williams
2009-09-09 23:06:23 -07:00
parent f0b3941c3b
commit 7c9aea1c2a
2 changed files with 3 additions and 2 deletions

View File

@@ -24,4 +24,4 @@ Run the standard library tests with nose; simply do:
$ cd tests/ $ cd tests/
$ nosetests stdlib $ nosetests stdlib
That should get you started. Note that most of the test failures are caused by `Nose issue 162 <http://code.google.com/p/python-nose/issues/detail?id=162>`_, which incorrectly identifies helper methods as test cases. Therefore, ignore any failure for the reason "TypeError: foo() takes exactly N arguments (2 given)", and sit tight until a version of Nose is released that fixes the issue. That should get you started. Note that most of the test failures are caused by `Nose issue 162 <http://code.google.com/p/python-nose/issues/detail?id=162>`_, which incorrectly identifies helper methods as test cases. Therefore, ignore any failure for the reason ``TypeError: foo() takes exactly N arguments (2 given)``, and sit tight until a version of Nose is released that fixes the issue.

View File

@@ -7,7 +7,7 @@ Eventlet is thread-safe and can be used in conjunction with normal Python thread
You can only communicate cross-thread using the "real" thread primitives and pipes. Fortunately, there's little reason to use threads for concurrency when you're already using coroutines. You can only communicate cross-thread using the "real" thread primitives and pipes. Fortunately, there's little reason to use threads for concurrency when you're already using coroutines.
The vast majority of the times you'll want to use threads are to wrap some operation that is not "green", such as a C library that uses its own OS calls to do socket operations. The tpool module is provided to make these uses simpler. The vast majority of the times you'll want to use threads are to wrap some operation that is not "green", such as a C library that uses its own OS calls to do socket operations. The :doc:`tpool </modules/tpool>` module is provided to make these uses simpler.
The simplest thing to do with tpool is to ``execute`` a function with it. The function will be run in a random thread in the pool, while the calling coroutine blocks on its completion:: The simplest thing to do with tpool is to ``execute`` a function with it. The function will be run in a random thread in the pool, while the calling coroutine blocks on its completion::
@@ -15,6 +15,7 @@ The simplest thing to do with tpool is to ``execute`` a function with it. The f
>>> from eventlet import tpool >>> from eventlet import tpool
>>> def my_func(starting_ident): >>> def my_func(starting_ident):
... print "running in new thread:", starting_ident != thread.get_ident() ... print "running in new thread:", starting_ident != thread.get_ident()
...
>>> tpool.execute(my_func, thread.get_ident()) >>> tpool.execute(my_func, thread.get_ident())
running in new thread: True running in new thread: True