-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
recv()
stuck awaiting
#32
Comments
Whoa! This is a tough one. I have been digging into your issue and will have to give it a thought during the weekend, now that Dobby is finally free. |
So, as a better workaround than spinning a |
yeah have been using that so far :) reduces cpu usage from 100% to 0.1% |
Question, what OS and what version of yaque are you using? It can be that the reason your app is getting stuck is the code not handling some specific event from the OS filesystem (this is still one other hypothesis of what is going on). |
MacOS 13.0.1 and version 0.6.6 for yaque |
I'm seeing the same here on macOS 13.6.1 and version yaque 0.6.6 as well. |
heya ! love the work being done on
yaque
it is an insanely useful crate :)Description of issue
I have a long running future as such:
With a sender that is triggered by API calls in a separate future.
However the receiver loop gets stuck at
recv.recv().await
, never resolving -- even when the sender succesfully sends !I've dug a bit into yaque to see where it hangs -- and it seems to never resolve on the following line (line 272) of
queue/receiver.rs
Digging further into the generated
ReadExact
future.read_until_you_drain
gets called twice when the queue is empty as dictated by the poll functionself.read_until_you_drain()
returns aPoll::Pending
state as we'd expect -- but then ... never gets triggered again so the future hangs indefinitly -- possibly the waker not operating as expected ?If I ctrlc-c to kill the process then reboot it -- the queue gets read correctly and the logic ensures correctly ... until the queue is empty once more and things hang.
As a work around I currently have replaced
recv()
withtry_recv()
which isn't ideal as the loop now spins and consumes the CPU entirely.Any help on the above would be much appreciated :)
The text was updated successfully, but these errors were encountered: