Closed jedisct1 closed 8 years ago
I think this is a bug. I think mailbox was supposed to be mpsc, and Receiving end not Clone-able, but I need to double check that.
I understand that for this scenario you'd like mpmc queue. Another thing to address in #76 .
Thanks for reporting this!
Oh, I've noticed that you're using mioco::sync::Mutex
. I've tried locally with current master, and it workd just fine.
I'm unable to reproduce. Maybe it was .. hmm... timing issue. Depends on how many cores you have or something. I'm going to close it, but if you have some followup, feel free to re-open.
I'm trying to get multiple consumers for a single producer
This is what happens:
And it goes on and on, only
A
is printed from now on.Everything quickly gets consumer by the first consumer coroutine, and only it. Nothing gets consumed by the second one any more.
A
is the slow coroutine, which is sleeping for 2500ms, whileB
is yielding faster (500ms), so shouldn't the opposite happen?