# Crossbeam\_channel try\_send into bounded(0) queue

**URL:** <https://users.rust-lang.org/t/crossbeam-channel-try-send-into-bounded-0-queue/140770>\
**Category:** help\
**Created:** [June 17, 2026, 6:35am UTC](https://users.rust-lang.org/t/crossbeam-channel-try-send-into-bounded-0-queue/140770 "2026-06-17T06:35:35Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![John\_Nagle](https://sea1.discourse-cdn.com/flex019/user_avatar/users.rust-lang.org/john_nagle/32/17844_2.png) [@John\_Nagle](https://users.rust-lang.org/u/John_Nagle)\
**Post date:** [June 17, 2026, 6:35am UTC](https://users.rust-lang.org/t/crossbeam-channel-try-send-into-bounded-0-queue/140770/1 "2026-06-17T06:35:35Z")

</div>

Here's a cute little behavior. I want one thread (my render loop) to trigger another thread that runs in parallel with the render thread. The other thread is faster and should always finish before the render thread gets around the loop. I want to check that it does. (Use case: render thread is drawing, other thread is updating the positions of moving objects for the next frame.)

So I have a **crossbeam\_channel** `bounded(0)` queue. The receiving thread is usually blocked on a recv, because it's fast, and a try\_send on the send end starts it off. This works fine.

As a check, I check the status from the try\_send. If it reports Full, I thought that meant the receiving thread hadn't made it back to the receive yet. But I looked at this with the Tracy profiler, and it does make it back with plenty of time to spare.

Turns out that the semantics of `try_send` are not quite what I'd expected for this case.  
I thought that if a "try\_send" reported Full, a `send` would block. No, `try_send` sends, never blocks, and always reports FULL on a queue of `bounded(0)`.

Github Copilot gives me the right answer, with the query

```
crossbeam_channel bounded(0) try_send

```

_Even if the receiver is blocked on recv(), try\_send still fails because it does not wait for the rendezvous._

That seems to be correct. Then Github Copilot goes on, in typical LLM fashion:

_To send successfully on a bounded(0) channel you must use send, not try\_send, because send blocks until the receiver is ready._

That seems to be sort of wrong. `try_send` will do the send, and the `recv` wakes up, but the status returned by `try_send` is always FULL, whether or not the send occurred. Which is kind of bogus behavior.

I don't see how the [code for try\_send](https://github.com/crossbeam-rs/crossbeam/blob/main/crossbeam-channel/src/flavors/zero.rs#L205) can ever both send and return FULL.

I'm missing something here.

---

<div class="post-metadata">

**Author:** ![nerditation](https://avatars.discourse-cdn.com/v4/letter/n/e79b87/32.png) [@nerditation](https://users.rust-lang.org/u/nerditation)\
**Post date:** [June 17, 2026, 7:57am UTC](https://users.rust-lang.org/t/crossbeam-channel-try-send-into-bounded-0-queue/140770/2 "2026-06-17T07:57:21Z")

</div>

> [@John\_Nagle](#):
>
> I don't see how the [code for try\_send](https://github.com/crossbeam-rs/crossbeam/blob/main/crossbeam-channel/src/flavors/zero.rs#L205) can ever both send and return FULL.

no it cannot. otherwise, you'd be able to clone an arbitrary type `T`, one value is sent to the receiver, another one is returned in the full error.

---

<div class="post-metadata">

**Author:** ![nerditation](https://avatars.discourse-cdn.com/v4/letter/n/e79b87/32.png) [@nerditation](https://users.rust-lang.org/u/nerditation)\
**Post date:** [June 17, 2026, 8:01am UTC](https://users.rust-lang.org/t/crossbeam-channel-try-send-into-bounded-0-queue/140770/3 "2026-06-17T08:01:32Z")

</div>

> [@John\_Nagle](#):
>
> No, `try_send` sends, never blocks, and always reports FULL on a queue of `bounded(0)`.

whatever actually happened in your application, it is not this. I think what you have observed is not what you thought you were trying to observe.

---

<div class="post-metadata">

**Author:** ![John\_Nagle](https://sea1.discourse-cdn.com/flex019/user_avatar/users.rust-lang.org/john_nagle/32/17844_2.png) [@John\_Nagle](https://users.rust-lang.org/u/John_Nagle)\
**Post date:** [June 17, 2026, 11:57am UTC](https://users.rust-lang.org/t/crossbeam-channel-try-send-into-bounded-0-queue/140770/4 "2026-06-17T11:57:26Z")

</div>

I think you're right.

I tried the example suggested by Github Copilot:

> **[Rust Playground](https://play.rust-lang.org/?version=stable&mode=debug&edition=2024&gist=80ae6ac60a71fa4dc353600c0ab4658e)**
>
> A browser interface to the Rust compiler to experiment with the language

It doesn't do what Copilot says it would. Note the comment

`// Now try_send again — this still fails because try_send is non-blocking.`

Then run the Playground. It doesn't fail where the comment says it should.

I'm using crossbeam-channel 0.5.10, while current is 0.5.15, but I looked at the Github and that's not it.

More later.

---

<div class="post-metadata">

**Author:** ![John\_Nagle](https://sea1.discourse-cdn.com/flex019/user_avatar/users.rust-lang.org/john_nagle/32/17844_2.png) [@John\_Nagle](https://users.rust-lang.org/u/John_Nagle)\
**Post date:** [June 17, 2026, 6:36pm UTC](https://users.rust-lang.org/t/crossbeam-channel-try-send-into-bounded-0-queue/140770/5 "2026-06-17T18:36:30Z")

</div>

Found it. Crossbeam channel try send to bounded(0) is working properly. Github Copilot is wrong. My code is detecting an error because there's a startup transient which causes a lock to be held for 500ms, instead of the usual few microseconds, resulting in an internal stall.

---

<div class="post-metadata">

**Author:** ![system](https://sea1.discourse-cdn.com/flex019/user_avatar/users.rust-lang.org/system/32/51372_2.png) [@system](https://users.rust-lang.org/u/system)\
**Post date:** [September 15, 2026, 6:37pm UTC](https://users.rust-lang.org/t/crossbeam-channel-try-send-into-bounded-0-queue/140770/6 "2026-09-15T18:37:17Z")

</div>

Closed on September 15, 2026, 6:37pm UTC

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.
