diff --git a/doc/testing.rst b/doc/testing.rst index c3c1ce5..70568e6 100644 --- a/doc/testing.rst +++ b/doc/testing.rst @@ -24,4 +24,4 @@ Run the standard library tests with nose; simply do: $ cd tests/ $ nosetests stdlib -That should get you started. Note that most of the test failures are caused by `Nose issue 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. \ No newline at end of file +That should get you started. Note that most of the test failures are caused by `Nose issue 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. \ No newline at end of file diff --git a/doc/threading.rst b/doc/threading.rst index f3c5c58..5cfec1d 100644 --- a/doc/threading.rst +++ b/doc/threading.rst @@ -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. -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 ` 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:: @@ -15,6 +15,7 @@ The simplest thing to do with tpool is to ``execute`` a function with it. The f >>> from eventlet import tpool >>> def my_func(starting_ident): ... print "running in new thread:", starting_ident != thread.get_ident() + ... >>> tpool.execute(my_func, thread.get_ident()) running in new thread: True