parent
bb0c95814a
commit
6446834bdf
13
pep-3148.txt
13
pep-3148.txt
|
@ -38,7 +38,7 @@ Check Prime Example
|
||||||
|
|
||||||
::
|
::
|
||||||
|
|
||||||
import futures
|
from concurrent import futures
|
||||||
import math
|
import math
|
||||||
|
|
||||||
PRIMES = [
|
PRIMES = [
|
||||||
|
@ -68,7 +68,7 @@ Web Crawl Example
|
||||||
|
|
||||||
::
|
::
|
||||||
|
|
||||||
import futures
|
from concurrent import futures
|
||||||
import urllib.request
|
import urllib.request
|
||||||
|
|
||||||
URLS = ['http://www.foxnews.com/',
|
URLS = ['http://www.foxnews.com/',
|
||||||
|
@ -95,10 +95,11 @@ Web Crawl Example
|
||||||
Interface
|
Interface
|
||||||
---------
|
---------
|
||||||
|
|
||||||
The proposed package provides two core classes: `Executor` and
|
The proposed package would be called "futures" and would live in a new
|
||||||
`Future`. An `Executor` receives asynchronous work requests (in terms
|
"concurrent" top-level package. It provides two core classes: `Executor` and
|
||||||
of a callable and its arguments) and returns a `Future` to represent
|
`Future`. An `Executor` receives asynchronous work requests (in terms of a
|
||||||
the execution of that work request.
|
callable and its arguments) and returns a `Future` to represent the execution
|
||||||
|
of that work request.
|
||||||
|
|
||||||
Executor
|
Executor
|
||||||
''''''''
|
''''''''
|
||||||
|
|
Loading…
Reference in New Issue