# Closing coroutine channels

**URL:** <https://discuss.kotlinlang.org/t/closing-coroutine-channels/2549>\
**Category:** Support\
**Created:** [May 6, 2017, 7:52am UTC](https://discuss.kotlinlang.org/t/closing-coroutine-channels/2549 "2017-05-06T07:52:56Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![zjuhasz](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.kotlinlang.org/zjuhasz/32/6399_2.png) [@zjuhasz](https://discuss.kotlinlang.org/u/zjuhasz)\
**Post date:** [May 6, 2017, 7:52am UTC](https://discuss.kotlinlang.org/t/closing-coroutine-channels/2549/1 "2017-05-06T07:52:56Z")

</div>

Could someone explain what closing a kotlinx.coroutines channel using `channel.close()` does and what the negative effect of not manually closing channels would be? I’ve looked at the documentation and the source code and I’m having some trouble understanding. If I don’t manually close a channel will there be some unnecessary processing? Will there be a reference to the channel somewhere that prevents it from being GCd? Or does the close function just exist as a way of informing potential users of the channel that it can no longer be used.

---

<div class="post-metadata">

**Author:** ![elizarov](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.kotlinlang.org/elizarov/32/2164_2.png) [@elizarov](https://discuss.kotlinlang.org/u/elizarov)\
**Post date:** [May 10, 2017, 9:56am UTC](https://discuss.kotlinlang.org/t/closing-coroutine-channels/2549/2 "2017-05-10T09:56:52Z")

</div>

I’ve reposted your question to StackOverflow and answered there: [kotlin - What closing a kotlinx.coroutines channel does - Stack Overflow](http://stackoverflow.com/questions/43889066/what-closing-a-kotlinx-coroutines-channel-does)
