提交 99326a46 编写于 作者: T Travis CI

Deploy to GitHub Pages: 6024a170

上级 265b5d35
......@@ -144,8 +144,9 @@ ch = fluid.make_channel(dtype=INT, buffer_size)
# Now write three elements to the channel
with fluid.while(steps=buffer_size):
fluid.send(ch, step)
fluid.close_channel(ch)
fluid.close_channel(ch)
with fluid.while(steps=buffer_size):
fluid.print(fluid.recv(ch))
```
......
......@@ -325,8 +325,9 @@
<span class="c1"># Now write three elements to the channel</span>
<span class="k">with</span> <span class="n">fluid</span><span class="o">.</span><span class="k">while</span><span class="p">(</span><span class="n">steps</span><span class="o">=</span><span class="n">buffer_size</span><span class="p">):</span>
<span class="n">fluid</span><span class="o">.</span><span class="n">send</span><span class="p">(</span><span class="n">ch</span><span class="p">,</span> <span class="n">step</span><span class="p">)</span>
<span class="n">fluid</span><span class="o">.</span><span class="n">close_channel</span><span class="p">(</span><span class="n">ch</span><span class="p">)</span>
<span class="n">fluid</span><span class="o">.</span><span class="n">close_channel</span><span class="p">(</span><span class="n">ch</span><span class="p">)</span>
<span class="k">with</span> <span class="n">fluid</span><span class="o">.</span><span class="k">while</span><span class="p">(</span><span class="n">steps</span><span class="o">=</span><span class="n">buffer_size</span><span class="p">):</span>
<span class="n">fluid</span><span class="o">.</span><span class="k">print</span><span class="p">(</span><span class="n">fluid</span><span class="o">.</span><span class="n">recv</span><span class="p">(</span><span class="n">ch</span><span class="p">))</span>
</pre></div>
......
......@@ -144,8 +144,9 @@ ch = fluid.make_channel(dtype=INT, buffer_size)
# Now write three elements to the channel
with fluid.while(steps=buffer_size):
fluid.send(ch, step)
fluid.close_channel(ch)
fluid.close_channel(ch)
with fluid.while(steps=buffer_size):
fluid.print(fluid.recv(ch))
```
......
......@@ -344,8 +344,9 @@
<span class="c1"># Now write three elements to the channel</span>
<span class="k">with</span> <span class="n">fluid</span><span class="o">.</span><span class="k">while</span><span class="p">(</span><span class="n">steps</span><span class="o">=</span><span class="n">buffer_size</span><span class="p">):</span>
<span class="n">fluid</span><span class="o">.</span><span class="n">send</span><span class="p">(</span><span class="n">ch</span><span class="p">,</span> <span class="n">step</span><span class="p">)</span>
<span class="n">fluid</span><span class="o">.</span><span class="n">close_channel</span><span class="p">(</span><span class="n">ch</span><span class="p">)</span>
<span class="n">fluid</span><span class="o">.</span><span class="n">close_channel</span><span class="p">(</span><span class="n">ch</span><span class="p">)</span>
<span class="k">with</span> <span class="n">fluid</span><span class="o">.</span><span class="k">while</span><span class="p">(</span><span class="n">steps</span><span class="o">=</span><span class="n">buffer_size</span><span class="p">):</span>
<span class="n">fluid</span><span class="o">.</span><span class="k">print</span><span class="p">(</span><span class="n">fluid</span><span class="o">.</span><span class="n">recv</span><span class="p">(</span><span class="n">ch</span><span class="p">))</span>
</pre></div>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册