# Strange interaction between \`Channel()\` and pipes

**URL:** https://discourse.julialang.org/t/strange-interaction-between-channel-and-pipes/7623
**Category:** General Usage
**Created:** [December 8, 2017, 1:48pm UTC](https://discourse.julialang.org/t/strange-interaction-between-channel-and-pipes/7623 "2017-12-08T13:48:25Z")
**Posts on this page:** 1
**Showing post:** 8

<div class="post-metadata">

### Author: ![davidavdav](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/davidavdav/32/1065_2.png) [@davidavdav](https://discourse.julialang.org/u/davidavdav)
#### Post date: [December 14, 2017, 9:33am UTC](https://discourse.julialang.org/t/strange-interaction-between-channel-and-pipes/7623/8 "2017-12-14T09:33:47Z")

</div>

Thanks, I see the problem now. It is, in a way, strange that the construct works so well for non-piped iobuffers.

I started writing the generator with a `do` block construct, hoping that the implicit `close()` would be triggered by destruction of the `IO` object, which would then happen when the caller iterates to the next item. However, that didn’t work either, so I guess my assumption about how the `open() do` construct works is false.

---

_[View the full topic](https://discourse.julialang.org/t/strange-interaction-between-channel-and-pipes/7623)._
