Page MenuHomePhabricator

D11269.id27073.diff
No OneTemporary

D11269.id27073.diff

diff --git a/src/docs/article/using_futures.diviner b/src/docs/article/using_futures.diviner
--- a/src/docs/article/using_futures.diviner
+++ b/src/docs/article/using_futures.diviner
@@ -65,7 +65,7 @@
foreach ($files as $file) {
$futures[$file] = new ExecFuture("gzip %s", $file);
}
- foreach (Futures($futures) as $file => $future) {
+ foreach (new FutureIterator($futures) as $file => $future) {
list($err, $stdout, $stderr) = $future->resolve();
if (!$err) {
echo "Compressed {$file}...\n";
@@ -83,7 +83,7 @@
You can also limit how many futures you want to run at once. For instance, to
process no more than 4 files simultaneously:
- foreach (Futures($futures)->limit(4) as $file => $future) {
+ foreach (id(new FutureIterator($futures))->limit(4) as $file => $future) {
// ...
}

File Metadata

Mime Type
text/plain
Expires
Wed, Mar 26, 3:29 PM (1 w, 1 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7723792
Default Alt Text
D11269.id27073.diff (830 B)

Event Timeline