mirror of
https://github.com/kennethreitz/background.git
synced 2026-06-05 23:10:18 +00:00
Update README.rst
This commit is contained in:
+3
-2
@@ -20,6 +20,7 @@ Basic Usage
|
||||
|
||||
import background
|
||||
|
||||
|
||||
@background.task
|
||||
def work():
|
||||
# Do something expensive here.
|
||||
@@ -35,16 +36,16 @@ Advanced Usage
|
||||
|
||||
.. code:: python
|
||||
|
||||
import time
|
||||
|
||||
import background
|
||||
|
||||
# Use 40 background threads.
|
||||
background.n = 40
|
||||
|
||||
|
||||
|
||||
@background.task
|
||||
def work():
|
||||
import time
|
||||
time.sleep(10)
|
||||
|
||||
@background.callback
|
||||
|
||||
Reference in New Issue
Block a user