Add the channel name into the sender creation failure message
It used to just fail saying "Too Many Senders". This isn't actionable.
We want the chanel name in there.
The fix is to propegate the failure up to the event loop where it can
make a more educated decision. Also, add a test (and make sure
simulation matches).
Change-Id: If70397ee319ad25ce5ab7ed146e8f5057d8af100
diff --git a/aos/ipc_lib/queue_racer.cc b/aos/ipc_lib/queue_racer.cc
index 9bb0a70..f5b3d7e 100644
--- a/aos/ipc_lib/queue_racer.cc
+++ b/aos/ipc_lib/queue_racer.cc
@@ -143,7 +143,7 @@
::std::thread([this, &t, thread_index, &run, write_wrap_count]() {
// Build up a sender.
LocklessQueue queue(memory_, config_);
- LocklessQueue::Sender sender = queue.MakeSender();
+ LocklessQueue::Sender sender = queue.MakeSender().value();
// Signal that we are ready to start sending.
t.ready.Set();